Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions next-themes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@ function MyApp({ Component, pageProps }) {
export default MyApp
```

### With Tailwind 4+

If dark mode is malfunctioning in Tailwind CSS v4 or later, you need to explicitly define the dark variant in your global stylesheet.

To fix this, update your `styles/global.css` file and add:

```jsx
// styles/global.css
@custom-variant dark (&:where(.dark, .dark *));
```

### With app/

You'll need to update your `app/layout.jsx` to use next-themes. The simplest `layout` looks like this:
Expand Down
Loading