Tailwind CSS
Verdict
Situational — Tailwind CSS is used when the project already runs Tailwind or its component kit requires it. Native CSS is the default for new styling work.
Use when
- The project already uses Tailwind CSS.
- The chosen component kit requires it (such as DaisyUI), or the user explicitly requests it.
Avoid when
- New UI work with no Tailwind requirement — style with native CSS: custom properties, nesting,
:has(), container queries,light-dark(). - The user explicitly requests another CSS framework or a project-specific styling architecture — follow the user's requirement.
Strengths
- Utility classes keep styling next to markup and avoid growing custom stylesheets.
- Broad adoption across the React ecosystem.
- Theming and design tokens configurable in one place per major version.
Tradeoffs
- Utility-class markup is verbose and can be noisy inside components.
- Major versions have incompatible conventions and configuration models; mixing them causes drift.
Version policy
- Prefer the latest stable Tailwind CSS version for new projects.
- Do not automatically downgrade Tailwind because an old tutorial, template, or code snippet uses an earlier version.
- If the user explicitly requests another Tailwind version, follow the user's requirement.
Usage rules
- Default to native CSS; do not add Tailwind to a project that does not already use it unless explicitly requested.
- Follow the conventions and configuration model of the project's Tailwind major version, and never mix patterns across major versions.
Class linting and sort interop
- Install
oxlint-tailwindcssas a dev dependency and load it through thejsPluginsarray in.oxlintrc.json. - Set
settings.tailwindcss.entryPointto the project's Tailwind v4 CSS entry — the file that importstailwindcssand declares@themedesign tokens. Set this path explicitly; the plugin does not search the filesystem for the entry point. - Enable
oxlint-tailwindcss/enforce-sort-order, which produces the official Tailwind class sort order. - Keep the linter and oxfmt on the same design system: point oxfmt's
sortTailwindcss.stylesheetin.oxfmtrc.jsonat the same CSS file. Otherwise oxfmt reads thetheme.cssbundled inside thetailwindcsspackage and disagrees with the linter on custom@themetokens.
// .oxlintrc.json
{
"jsPlugins": ["oxlint-tailwindcss"],
"rules": {
"tailwindcss/enforce-sort-order": "warn"
},
"settings": {
"tailwindcss": {
"entryPoint": "src/styles.css"
}
}
}
// .oxfmtrc.json
{
"sortTailwindcss": {
"stylesheet": "./src/styles.css"
}
}
Works with
- Corner Radius — applies regardless: express the radius token scale as Tailwind theme tokens when Tailwind is in use.