# @uswds-tailwind/modal-compat

[![Open on npmx.dev](https://npmx.dev/api/registry/badge/version/@uswds-tailwind/modal-compat)](https://npmx.dev/package/@uswds-tailwind/modal-compat)
[![Open on npmx.dev](https://npmx.dev/api/registry/badge/license/@uswds-tailwind/modal-compat)](https://npmx.dev/package/@uswds-tailwind/modal-compat)

Headless [zag-js](https://zagjs.com/) state machine for the USWDS modal component. Provides state and accessibility behavior used by `@uswds-tailwind/react` and `@uswds-tailwind/compat`.

> [!NOTE]
> This package is in **alpha**. APIs may change between releases.

## Install

```bash
npm install @uswds-tailwind/modal-compat@alpha
```

## Usage

This is a low-level building block. Most consumers should reach for one of the higher-level packages instead:

- React: [`@uswds-tailwind/react`](https://npmx.dev/package/@uswds-tailwind/react)
- Vanilla JS: [`@uswds-tailwind/compat`](https://npmx.dev/package/@uswds-tailwind/compat)

If you need to wire the machine up to a different framework, see the [zag-js docs](https://zagjs.com/) for the framework-agnostic machine API.

## License

[MIT](./LICENSE)
