An open API service indexing awesome lists of open source software.

https://github.com/josemarluedke/ember-focus-trap

A Ember modifier to trap your focus.
https://github.com/josemarluedke/ember-focus-trap

Last synced: 6 months ago
JSON representation

A Ember modifier to trap your focus.

Awesome Lists containing this project

README

          




Build Status
Ember Observer Score
NPM version

**Ember Focus Trap**: A Ember modifier to trap your focus.

[View the docs here](https://ember-focus-trap.netlify.app/).

We use [focus-trap](https://github.com/focus-trap/focus-trap) as a lower-level implementation.
It is super lightweight and has minimal dependencies.

Trap focus within a DOM node.

There may come a time when you find it important to trap focus within a DOM node — so that when a user hits `Tab` or `Shift+Tab` or clicks around, she can"t escape a certain cycle of focusable elements.

Please read the [focus-trap](https://github.com/focus-trap/focus-trap) documentation to understand what a focus trap is, what happens when a focus trap is activated, and what happens when one is deactivated.

## Compatibility

* Ember.js v4.16 or above (Ember v4 compatible)
* Ember CLI v4.12 or above
* Node.js v12 or above

## Installation

```
ember install ember-focus-trap
```

## Usage

[See demos and read the documentation here](https://josemarluedke.github.io/ember-focus-trap).

```hbs



Here is a focus trap
with
some
focusable
parts.



Some button



```

### With Focus Trap Options

```hbs



Here is a focus trap
with
some
focusable
parts.



Some button



```

## Contributing

See the [Contributing](CONTRIBUTING.md) guide for details.

## License

This project is licensed under the [MIT License](LICENSE.md).