Skip to content

Commit e1c6479

Browse files
authored
documentation for tailwind@4 and daisyui@5
1 parent f6bcf5f commit e1c6479

File tree

1 file changed

+9
-15
lines changed

1 file changed

+9
-15
lines changed

packages/daisyui/README.md

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -75,22 +75,16 @@ For dynamic theme switching, you can change the data-theme attribute in your app
7575

7676
## Tailwind Configuration
7777

78-
Make sure your `tailwind.config.js` includes the DaisyUI plugin:
79-
80-
```js
81-
/** @type {import('tailwindcss').Config} */
82-
module.exports = {
83-
content: ['./src/**/*.{js,jsx,ts,tsx}'],
84-
theme: {
85-
extend: {},
86-
},
87-
plugins: [require('daisyui')],
88-
daisyui: {
89-
themes: true,
90-
},
91-
};
92-
```
78+
Make sure your `src/index.css` includes the DaisyUI plugin:
9379

80+
```css
81+
@import 'tailwindcss';
82+
@source "../node_modules/@rjsf/daisyui";
83+
@plugin "daisyui" {
84+
themes: all;
85+
}
86+
```
87+
It's necessary to explicitely include the library as a source, as tailwindcss by [default](https://tailwindcss.com/docs/detecting-classes-in-source-files#explicitly-registering-sources) ignores everything in `.gitignore`
9488
## Customization
9589

9690
### Grid Layout

0 commit comments

Comments
 (0)