Skip to main content

Theme for Tailwind CSSs

Theme configuration in Tailwind CSS is how you customise the design system to match a brand. You define colours, fonts, spacing, breakpoints and custom utilities in the configuration, or in the CSS theme layer in recent versions. This keeps every value consistent across the project and makes dark mode and rebranding a central change.

Stage: Customisation · Part of the Tailwind CSS roadmap · Last reviewed 19 November 2026

What to learn in Theme

Theme interview questions

What is the difference between extending and overriding the theme?

Extending adds new values, for example one extra colour, while keeping all the defaults. Overriding a key replaces the whole default set for that key, so old values like gray-500 disappear. Extend unless you deliberately want a smaller design scale.

How does dark mode work in Tailwind?

The dark: variant applies a utility in dark mode. It can follow the operating system preference through prefers-color-scheme, or a class or data attribute you toggle yourself, which supports a manual switch. You pair light and dark utilities, such as bg-white dark:bg-gray-900.

Where Theme fits in the Tailwind CSS roadmap

Theme belongs to the Customisation stage (beginner level). Make it yours.

Back to the full Tailwind CSS roadmap