addyosmani / typeahead-country

A Polymer element for autocompleting country names

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

<typeahead-country>

A Polymer element for autocompleting country names

Maintained by Addy Osmani.

Demo

Check it live.

Installation

Using Bower, run:

bower install typeahead-country

Usage

  1. Import Web Components' polyfill:

    <script src="//cdnjs.cloudflare.com/ajax/libs/polymer/0.1.4/platform.js"></script>
  2. Import Custom Element:

    <link rel="import" href="src/typeahead-country.html">
  3. Start using it!

    <typeahead-country><typeahead-country>

Setup

In order to run it locally you'll need a basic server setup.

  1. Install NodeJS.

  2. Install GruntJS:

    $ [sudo] npm install -g grunt-cli
  3. Install local dependencies:

    $ npm install
  4. Run a local server and open http://localhost:8000.

    $ grunt connect

Options

Attribute Options Default Description
preview boolean false Display a preview of the country options available

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -m 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

MIT License

About

A Polymer element for autocompleting country names

License:MIT License