typeahead
typeahead component
Last updated 5 years ago by defunctzombie .
Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install typeahead 
SYNC missed versions from official npm registry.

typeahead

typeahead widget

typeahead

use

var Typeahead = require('typeahead');

var input = document.createElement('input');

// source is an array of items
var ta = Typeahead(input, {
    source: ['foo', 'bar', 'baz']
});

input // =>

To get the default style you also have to include style.css.

options

source

array of values or function(query, result). Call result with array of return values.

var Typeahead = require('typeahead');
var input = document.createElement('input');

// source is an array of items
var ta = Typeahead(input, {
    source: function(query, result) {
        result(['foo', 'bar', 'baz']);
    }
});

input // =>

position

location of the drop down menu. Valid values are above, below and right. default is below

autoselect

Automatically select first item in drop down menu. Valid values are true, false. Default is true.

style

Custom styling can be applied for the following rules.

.typeahead

To style the list of suggestions.

.typeahead.hidden

To style the hidden state of the menu

.typeahead li

To style a li container.

.typeahead a

To style the actual item text and selection area.

.typeahead .active > a

To style the appearance of a selected item.

License

The current code is fork of the bootstrap typeahead component and is licensed under Apache License, Version 2.0

Current Tags

  • 0.2.2                                ...           latest (5 years ago)

8 Versions

  • 0.2.2                                ...           5 years ago
  • 0.2.1                                ...           5 years ago
  • 0.2.0                                ...           6 years ago
  • 0.1.0                                ...           8 years ago
  • 0.0.3                                ...           8 years ago
  • 0.0.2                                ...           8 years ago
  • 0.0.1                                ...           8 years ago
  • 0.0.0                                ...           8 years ago
Maintainers (1)
Downloads
Today 0
This Week 3
This Month 15
Last Day 1
Last Week 3
Last Month 12
Dependencies (2)
Dev Dependencies (0)
None

Copyright 2014 - 2016 © taobao.org |