Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/scottbedard/tailwindcss-dialogs


https://github.com/scottbedard/tailwindcss-dialogs

Last synced: 18 days ago
JSON representation

Awesome Lists containing this project

README

        

# `@bedard/tailwindcss-dialogs`

[![Build](https://github.com/scottbedard/tailwindcss-dialogs/actions/workflows/build.yml/badge.svg)](https://github.com/scottbedard/tailwindcss-dialogs/actions/workflows/build.yml)
[![NPM](https://img.shields.io/npm/v/%40bedard%2Ftailwindcss-dialogs)](https://www.npmjs.com/package/@bedard/tailwindcss-dialogs)
[![License](https://img.shields.io/badge/license-MIT-blue)](https://github.com/scottbedard/tailwindcss-dialogs/blob/main/LICENSE)

Tailwind CSS utilities for styling and animating dialog elements.

[View sandbox →](https://main--tailwindcss-dialogs.netlify.app/)

## Installation

First, install the package from NPM.

```sh
npm install --save-dev @bedard/tailwindcss-dialogs
```

Next, add the following to your `tailwind.config.js` file.

```js
import dialogs from '@bedard/tailwindcss-dialogs'

export default {
plugins: [
dialogs
]
}
```

## Basic usage

This plugin provides one utility class, and three variant utilities.

1. The [`allow-discrete`](https://developer.mozilla.org/en-US/docs/Web/CSS/transition-behavior#discrete_animation_behavior) class enables entry / exit transitions
2. `backdrop` targets a dialog's backdrop pseudo element
3. `open` targets the the open state
4. `from` targets a dialog's [`starting-style`](https://developer.mozilla.org/en-US/docs/Web/CSS/@starting-style)

## License

[MIT](https://github.com/scottbedard/tailwindcss-dialogs/blob/master/LICENSE)

Copyright (c) 2024-present, Scott Bedard