@zag-js/dismissable
Version:
Dismissable layer utilities for the DOM
27 lines (18 loc) • 766 B
Markdown
```sh
yarn add @zag-js/dismissable
npm i @zag-js/dismissable
```
- Provides a layering system with built-in dismiss mechanism
- Closess when user interacts outside or focus is called programmatically outside the layer
- Tracks its descendant and ensure focus remains within the layer even if the previously focused descendant is removed
from the DOM
- Allows for nesting multiple layers
- Dismiss mechanism only works for the topmost layer
Yes please! See the [contributing guidelines](https://github.com/chakra-ui/zag/blob/main/CONTRIBUTING.md) for details.
This project is licensed under the terms of the [MIT license](https://github.com/chakra-ui/zag/blob/main/LICENSE).