/ember-cli-focus-input

An ember-addon for focused inputs and buttons

Primary LanguageJavaScriptMIT LicenseMIT

Ember-cli-focus-input

Build Status NPM Downlaads

Description

Ember-cli-focus-input is a set of ember components that provide autofocus (the first input of your form/page).

Installation

# Install via npm
$ npm install ember-cli-focus-input --save-dev
# make ember-cli fetch interal dependencies
$ ember g ember-cli-focus-input

Focus Input

{{focus-input value=model.field class="foo"}}

By default the input will be focused and have the content selected. If you prefer not to have the text selected/highlighted configure it like so.

{{focus-input value=model.field class="foo" select="false"}}

Focus Button

{{focus-button value=model.buttonField class="bar"}}

Running Tests

npm install
bower install
ember test
ember test --server

Issues/Contributions

PRs are welcome!

License

Copyright © 2015 Brandon Williams http://williamsbdev.com

Licensed under the MIT License