# ember-cli-focus-input

> Components that have focus

Latest version **2.2.0** (published 2019-04-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install ember-cli-focus-input
pnpm add ember-cli-focus-input
yarn add ember-cli-focus-input
bun add ember-cli-focus-input
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.2.0 |
| Published | 2019-04-10 |
| First published | 2015-02-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | 6.* \|\| 8.* \|\| >= 10.* |
| Dependencies | 2 |
| Unpacked size | 5.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Brandon Williams williamsbdev@gmail.com |
| Maintainers | toranb, williamsbdev |
| Keywords | ember-addon, focus-input, input, focus, ember |

## Links

- npm: https://www.npmjs.com/package/ember-cli-focus-input
- Repository: https://github.com/williamsbdev/ember-cli-focus-input
- Issues: https://github.com/williamsbdev/ember-cli-focus-input/issues
- npm.io page: https://npm.io/package/ember-cli-focus-input

## Dependencies (2)

- [@ember/jquery](https://npm.io/package/@ember/jquery.md) ^0.6.0
- [ember-cli-babel](https://npm.io/package/ember-cli-babel.md) ^7.1.2

## Recent versions

- 2.2.0 (latest) — 2019-04-10
- 2.1.0 — 2019-03-26
- 2.0.0 — 2018-06-20
- 1.0.0 — 2015-06-16
- 0.4.1 — 2015-04-29
- 0.4.0 — 2015-04-13
- 0.3.0 — 2015-03-09
- 0.2.0 — 2015-02-11
- 0.1.1 — 2015-02-07
- 0.1.0 — 2015-02-07

## README

# Ember-cli-focus-input

[![Build Status][]](https://travis-ci.org/williamsbdev/ember-cli-focus-input)
[![NPM Downloads][]](https://www.npmjs.org/package/ember-cli-focus-input)

## Description

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

## Why? There's the HTML5 input autofocus attribute!

The HTML5 input autofocus attribute does not work properly for Ember applications. It just lets you specify that a form control should have input focus **when the page loads**. That's why the attribute does not work properly for single page applications (SPA's).

## Installation

As any other ember-cli addon, run:

    $ ember install 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 (or yarn install)
    ember test
    ember try:each (test against multiple ember versions defined in config/ember-try.js)

## License

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

Licensed under the MIT License

[Build Status]: https://travis-ci.org/williamsbdev/ember-cli-focus-input.svg?branch=master
[NPM Downloads]: https://img.shields.io/npm/dm/ember-cli-focus-input.svg

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