Privacy-friendly analytics only with consent. No ads, no cross-site tracking. Read the privacy policy.
Slipstream UI ships a CSS-first theme contract for Tailwind v4. It maps every semantic token the components use, so createTheme(), presets and dark mode keep working without a tailwind.config.js.
@import "tailwindcss";@import "@slipstream-ui/themes/tailwind-v4.css";/* Tell v4 where the component classes live. */@source "../../node_modules/@slipstream-ui/core/dist";@source "../../node_modules/@slipstream-ui/ai/dist";/* Optional: animated overlays */@plugin "tailwindcss-animate";
The v4 file reads the same HSL channel variables that createTheme() emits. Apply them to the root element (or a scoped container):
import { createTheme, themeToCssVariables } from "@slipstream-ui/themes";const css = themeToCssVariables(createTheme({ brandColor: "224 89% 53%" }));document.documentElement.setAttribute("style", css);
The v4 entry declares @custom-variant dark against the .dark class, matching the v3 preset. Toggle the class on <html> as before.
@source entries so v4 scans the published component output.tailwindcss-animate via @plugin, or tw-animate-css; without it, overlays still render but lose motion.packages/core/src/test/tailwind-v4.test.ts scans every component for semantic colour classes and fails if the v4 file is missing a token. It also checks radius, density, motion and accordion animations. It does not replace a real v4 app build.