# @zag-js/dismissable

> Dismissable layer utilities for the DOM

Latest version **1.44.0** (published 2026-09-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install @zag-js/dismissable
pnpm add @zag-js/dismissable
yarn add @zag-js/dismissable
bun add @zag-js/dismissable
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.44.0 |
| Published | 2026-09-13 |
| First published | 2022-07-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 43.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5215 |
| Author | Segun Adebayo <sage@adebayosegun.com> |
| Maintainers | segunadebayo |
| Keywords | js, utils, dimissable, layer, close, signal, outside-click |

## Links

- npm: https://www.npmjs.com/package/@zag-js/dismissable
- Repository: https://github.com/chakra-ui/zag/tree/main/packages/utilities/interact-outside
- Homepage: https://github.com/chakra-ui/zag#readme
- Issues: https://github.com/chakra-ui/zag/issues
- npm.io page: https://npm.io/package/@zag-js/dismissable

## Dependencies (3)

- [@zag-js/utils](https://npm.io/package/@zag-js/utils.md) 1.44.0
- [@zag-js/dom-query](https://npm.io/package/@zag-js/dom-query.md) 1.44.0
- [@zag-js/interact-outside](https://npm.io/package/@zag-js/interact-outside.md) 1.44.0

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.44.0 (latest) — 2026-09-13
- 2.0.0-next.3 (next) — 2026-09-14
- 0.0.0-v1-beta-20250222173217 (v1-beta) — 2025-02-22
- 0.0.0-dev-20240723090825 (dev) — 2024-07-23
- 2.0.0-next.2 — 2026-08-31
- 1.43.3 — 2026-08-20
- 1.43.2 — 2026-08-20
- 1.43.1 — 2026-08-16
- 2.0.0-next.1 — 2026-08-01
- 1.43.0 — 2026-07-29
- 1.42.0 — 2026-06-29
- 1.41.2 — 2026-06-05
- 2.0.0-next.0 — 2026-06-04
- 1.41.1 — 2026-05-26
- 1.41.0 — 2026-05-21
- … 882 more at https://npm.io/package/@zag-js/dismissable/versions

## README

# @zag-js/dismissable

## Installation

```sh
yarn add @zag-js/dismissable
# or
npm i @zag-js/dismissable
```

## Features

- 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

## Contribution

Yes please! See the [contributing guidelines](https://github.com/chakra-ui/zag/blob/main/CONTRIBUTING.md) for details.

## Licence

This project is licensed under the terms of the [MIT license](https://github.com/chakra-ui/zag/blob/main/LICENSE).

---
_Source: https://npm.io/package/@zag-js/dismissable · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
