-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { Meta } from '@storybook/blocks'; | ||
|
||
<Meta title="Tailwind plugin" /> | ||
|
||
# Tailwind plugin | ||
|
||
If you want to use Frosted UI with Tailwind CSS, you can use the Frosted UI Tailwind plugin. | ||
The plugin maps all of the FUI color and font related tokens to Tailwind CSS classes. | ||
|
||
## Usage | ||
|
||
Add the `frostedThemePlugin` to `plugins` in your `tailwind.config.js` file. | ||
|
||
```js | ||
import { frostedThemePlugin } from 'frosted-ui'; | ||
|
||
export default { | ||
darkMode: ['class'], | ||
content: [], | ||
theme: { | ||
extend: {}, | ||
}, | ||
plugins: [frostedThemePlugin()], | ||
}; | ||
``` | ||
|
||
Then you can use the Frosted UI tokens via Tailwind classes. | ||
|
||
```tsx | ||
<div className="text-1 leading-1 bg-gray-a2 text-success-9">Frosted UI</div> | ||
``` |