ENATIV Logo
ENATIV
Back
© 2026 ENATIV
ProjectsServicesKnowledge hubContact
contact@enativ.pl
  1. Knowledge hub
  2. ›
  3. Frontend
  4. ›
  5. Tailwind CSS

Tailwind CSS

A CSS framework of utility classes: tokens in CSS, only the rules in use generated, a consistent look across components.

FrontendUsing since 2019 · Featured project: Budzowska Fiutowski i Partnerzy

Category
Frontend
Using since
2019
Featured project
Budzowska Fiutowski i Partnerzy

In practice

Tailwind CSS is my main choice for styling. I pick it when a site should look consistent and stay maintainable after hand-over: styles sit next to components, and colours and spacing live in one place. It is in the stack of Budzowska Fiutowski i Partnerzy and ENATIV Portfolio. For a single static page I would not reach for it.

What is Tailwind CSS?

Tailwind CSS is a CSS framework built on utility classes. Instead of naming classes and writing rules for them in a separate stylesheet, you compose the look from small single-purpose classes, such as spacing, colour or font size, and write them straight into the component markup. You then pick values from a defined system, not arbitrary numbers.

Tailwind treats source files as plain text, looks for class names in them and generates CSS only for the ones it actually found. The output file therefore holds what the site uses. There is one consequence: a class whose name is assembled from fragments goes undetected. The colours, typeface and breakpoints of a project you describe as theme variables, with the @theme directive in the CSS itself.

Kind
A CSS framework built on utility classes
Styling
Classes written in the component markup
Project tokens
Theme variables in CSS, the @theme directive
Output CSS
Only the classes found in the source

How I work with Tailwind CSS

I start with tokens, not classes. Before the first component exists, I settle the colours, spacing and typography as theme variables, so every change of look comes from one place.

  1. Tokens in a CSS file

    I describe the theme with the @theme directive in a CSS file, with no separate config file. That is how ENATIV Portfolio is set up: the tokens live in globals.css and the project has no tailwind.config file.

  2. Components, not copies

    A look that repeats goes into a component, not into a pasted list of classes. I describe variants, such as those of a button, with CVA in a separate file, and take accessible behaviour from Radix components. In the Code & Pepper team I worked with the Tailwind CSS and Radix UI pair on Gaia Lens, where the interface was redesigned for investor workflows.

  3. Complete class names

    I write class names in full and map variants to ready-made sets of classes, because Tailwind will not detect a class built from pieces. The generated CSS then holds what the page uses.

When it fits, and when it doesn't

Tailwind CSS makes sense where the look is made of repeatable components and should stay consistent after hand-over.

A good fit when

  • A site or app in React and Next.js where the look lives in components.
  • A site that should look the same on every screen and keeps colours and spacing in one place.
  • A redesign of a site whose old stylesheet nobody understands any more.
  • A team that changes the look itself after launch and does not want to hunt for rules in a foreign stylesheet.

Not a fit when

  • A single static page that nobody will extend.
  • A team that knows only plain CSS and has no time to learn class names.
  • A project with a ready style system in another tool that must stay untouched.

When there are few styles and they belong to one component, plain CSS or CSS Modules is enough. The category filter in the knowledge hub of ENATIV Portfolio works that way.

Frequently asked questions

Styles sit in components next to the markup, and colours and spacing in one CSS file, so anyone who knows Tailwind changes the look where they see it, with no hunt through a separate stylesheet. At hand-over I leave the rules: where the tokens come from and how variants are named. If nobody on your team knows it, we settle that before the start.
Tailwind generates CSS only for the classes found in the code, so the file does not grow with rules the site never uses. Loading speed, though, depends mostly on images and scripts, which I cover in the Core Web Vitals entry. I promise no numbers, because the result depends on the particular site.
Yes. Radix supplies low-level accessible components, and you add the look with Tailwind classes. That is how ENATIV Portfolio works, with shadcn/ui components on top of Radix, and Gaia Lens, whose interface is built on Radix UI and Tailwind CSS.
It imposes no look, only a set of values you assemble a design from. It is a framework for building custom designs: colours and typeface are yours to set in the theme. The limit is discipline, since a value outside the theme gets written in on purpose.

On this page

  • In practice
  • What is Tailwind CSS?
  • How I work with Tailwind CSS
  • When it fits, and when it doesn't
  • Frequently asked questions

Related topics

  • Tailwind CSS
  • Next.js
  • React
  • TypeScript
  • Core Web Vitals

Related services

  • Web ApplicationsModern, fast and scalable web applications using React and Next.js.
  • Landing PagesHigh-converting landing pages optimized for marketing campaigns.
  • Website RedesignRedesign and migration without losing your Google rankings - URL mapping, 301 redirects, and post-launch verification.

A site look that needs order?

Tell me who will change the look after launch and whether a visual design already exists. I will answer whether Tailwind CSS fits or plain CSS is enough.

Describe your projectSee Budzowska Fiutowski i Partnerzy