diff --git a/README.md b/README.md index 24fbb4b..0d0d1e1 100644 --- a/README.md +++ b/README.md @@ -494,6 +494,20 @@ Now set the `attribute` for your ThemeProvider to `data-mode`: ``` +Add `@variant` selectors to your global css, e.g. TanStack's default `styles.css`: + +```css +/* This configures the 'dark:' prefix for Tailwind */ +@variant dark (&:where([data-theme="dark"], [data-theme="dark"] *)); +``` + +You can use `@variant` to create any number of custom themes: + +```css +/* Custom 'jungle:' theme Tailwind selector */ +@variant jungle (&:where([data-theme="jungle"], [data-theme="jungle"] *)); +``` + With this setup, you can now use Tailwind's dark mode classes, as in the previous example. ## Discussion