# ember-typeahead

> The default blueprint for ember-cli addons.

Latest version **0.5.0** (published 2017-11-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install ember-typeahead
pnpm add ember-typeahead
yarn add ember-typeahead
bun add ember-typeahead
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.5.0 |
| Published | 2017-11-22 |
| First published | 2016-11-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | ^4.5 \|\| 6.* \|\| >= 7.* |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Brian Runnells |
| Maintainers | dhaulagiri |
| Keywords | ember-addon |

## Links

- npm: https://www.npmjs.com/package/ember-typeahead
- Repository: https://github.com/Dhaulagiri/ember-typeahead
- Homepage: https://github.com/Dhaulagiri/ember-typeahead#readme
- Issues: https://github.com/Dhaulagiri/ember-typeahead/issues
- npm.io page: https://npm.io/package/ember-typeahead

## Dependencies (1)

- [ember-cli-babel](https://npm.io/package/ember-cli-babel.md) ^6.8.1

## Recent versions

- 0.5.0 (latest) — 2017-11-22
- 0.4.0 — 2016-11-07

## README

# Ember-typeahead

`ember-typeahead` is an ember-cli addon that wraps up the [typeahead.js](https://twitter.github.io/typeahead.js/) and [Tokenfield for Boostrap](http://sliptree.github.io/bootstrap-tokenfield/) plugins and exposes them through a single ember component.

## Usage

### Typeahead

The default usage of the `type-ahead` component gives the consumer a typeahead.js search:

```handlebars
  {{type-ahead
    id="typeahead-id"
    content=contentArray
    displayKey="name"
    valueToken="name"
    placeholder="Search by name"
    class="form-control"
    selectOnEnter=true
    suggestionTemplate=suggestionTemplate
    emptyTemplate=emptyTemplate
    limit=numberofresultstodisplay
    onSelectAction="ActionToRunOnSelect"}}
```

### Tokenized

Switching the typeahead from a typeahead.js function to a Tokenfield for Bootstrap function is as simple as passing `tokenized=true` into the component as well as setting the `value` property to a comma-delimited string of values that will be bound as the tokenized list of items selected in the input.

 ```handlebars
  {{type-ahead
    id="typeahead-id"
    tokenized=true
    value=selectedApps
    content=contentArray
    displayKey="name"
    valueToken="name"
    placeholder="Search by name"
    class="form-control"
    suggestionTemplate=suggestionTemplate
    emptyTemplate=emptyTemplate}}
```

## Installation

* `git clone https://github.com/dhaulagiri/ember-typeahead` this repository
* `cd ember-typeahead`
* `yarn`

## Running

* `ember serve`
* Visit your app at [http://localhost:4200](http://localhost:4200).

## Further Reading / Useful Links

* The typeahead.js component is based heavily on the [ember-cli-twitter-typeahead](https://github.com/Dhaulagiri/ember-cli-twitter-typeahead) addon
* [Tokenfield for Boostrap](http://sliptree.github.io/bootstrap-tokenfield/)
* [typeahead.js](https://twitter.github.io/typeahead.js/)
* `npm test` (Runs `ember try:each` to test your addon against multiple Ember versions)
* `ember test`
* `ember test --server`

## Building

* `ember build`

For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).

---
_Source: https://npm.io/package/ember-typeahead · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
