Tailwind CSS

c15t works with Tailwind CSS out of the box. Use the slots theme option to apply Tailwind utility classes to any component part.

Setup

Import the standard c15t stylesheet once in your app-level CSS entrypoint:

Keeping the c15t stylesheet in your global CSS entrypoint makes layer and cascade order explicit. JS/TSX side-effect imports can load in a different order across framework and Tailwind tooling, which makes style regressions harder to debug.

Tailwind v4

Tailwind v4 automatically scans your source files. Import Tailwind normally, then place the c15t stylesheet immediately after it. c15t component styles join Tailwind's components layer automatically, so no extra c15t-specific layer declaration is needed:

Tailwind v3

Import the Tailwind 3-compatible c15t stylesheet after @tailwind components; and before @tailwind utilities;:

Using Tailwind with Slots

Apply Tailwind classes via the theme's slots object:

Dark Mode with Tailwind

Combine Tailwind's dark mode with c15t's dark tokens:

Optional: noStyle Mode

If you want Tailwind to own all layout and visual styling, use noStyle: true.

Info

When using noStyle: true with Tailwind, you're responsible for all layout and visual styling. Start with slots first, then switch to noStyle only when you need full control.

For full custom markup (not just styles), see Headless Mode.