typeahead.js README

The project's README from github.com/twitter/typeahead.js. As one markdown file: README.md.

build status Built with Grunt

typeahead.js

Inspired by twitter.com's autocomplete search functionality, typeahead.js is a flexible JavaScript library that provides a strong foundation for building robust typeaheads.

The typeahead.js library consists of 2 components: the suggestion engine, Bloodhound, and the UI view, Typeahead. The suggestion engine is responsible for computing suggestions for a given query. The UI view is responsible for rendering suggestions and handling DOM interactions. Both components can be used separately, but when used together, they can provide a rich typeahead experience.

Getting Started

How you acquire typeahead.js is up to you.

Preferred method:

Other methods:

Note: both bloodhound.js and typeahead.jquery.js have a dependency on jQuery 1.9+.

Documentation

Examples

For some working examples of typeahead.js, visit the examples page.

Browser Support

NOTE: typeahead.js is not tested on mobile browsers.

Customer Support

For general questions about typeahead.js, tweet at @typeahead.

For technical questions, you should post a question on Stack Overflow and tag it with typeahead.js.

Issues

Discovered a bug? Please create an issue here on GitHub!

https://github.com/twitter/typeahead.js/issues

Versioning

For transparency and insight into our release cycle, releases will be numbered with the following format:

<major>.<minor>.<patch>

And constructed with the following guidelines:

For more information on semantic versioning, please visit http://semver.org/.

Testing

Tests are written using Jasmine and ran with Karma. To run the test suite with PhantomJS, run $ npm test.

Developers

If you plan on contributing to typeahead.js, be sure to read the contributing guidelines. A good starting place for new contributors are issues labeled with entry-level. Entry-level issues tend to require minor changes and provide developers a chance to get more familiar with typeahead.js before taking on more challenging work.

In order to build and test typeahead.js, you'll need to install its dev dependencies ($ npm install) and have grunt-cli installed ($ npm install -g grunt-cli). Below is an overview of the available Grunt tasks that'll be useful in development.

Maintainers

Authors

License

Copyright 2013 Twitter, Inc.

Licensed under the MIT License

typeahead.js (twitter/typeahead.js)

Searching Database…

Что это такое?Гибкая JavaScript-библиотека автодополнения от Twitter, вдохновлённая поиском с автодополнением на twitter.com. Она даёт основу для создания надёжных подсказок при вводе (typeahead — полей с поисковыми подсказками) на веб-страницах.
Это одна библиотека или она состоит из отдельных частей?Два компонента, которые можно использовать по отдельности или вместе: Bloodhound — это движок подсказок, который вычисляет варианты для запроса; Typeahead — это компонент интерфейса, который их отображает и обрабатывает события в DOM.
Как подключить её к своей странице?Выполните bower install typeahead.js или скачайте файлы из dist: typeahead.bundle.js содержит оба компонента в одном файле, также доступны отдельные bloodhound.js / typeahead.jquery.js и минимизированный бандл.
Нужен ли jQuery, чтобы всё работало?Да. И bloodhound.js, и typeahead.jquery.js требуют jQuery 1.9+, поэтому сначала подключите jQuery на странице.
Какие браузеры поддерживаются?Chrome, Firefox 3.5+, Safari 4+, Internet Explorer 8+ и Opera 11+. Мобильные браузеры не тестировались, поэтому поддержку мобильных устройств стоит считать неподтверждённой.
Можно ли использовать движок Bloodhound без интерфейса typeahead?Да. В README сказано, что оба компонента можно использовать по отдельности, и bloodhound.js как раз поставляется как самостоятельный файл движка подсказок.
Что вдохновило создателей проекта?Поиск с автодополнением на twitter.com. README прямо называет его источником вдохновения, а сама библиотека вышла из Twitter, Inc. (Copyright 2013 Twitter, Inc.).
Creator
twitter
Size
2.1 MB
Stars
16.4K
Updated
CommitApr 27
Age
13y
Commits · 90 Days