Stop generating AI slop. Use Blueprint MCP server →

Ruby on Rails Tailwind CSS

Use Tailwind CSS and daisyUI in Rails with cleaner ERB

Rails Tailwind CSS

Tailwind CSS fits the Rails way

Rails rewards building useful HTML quickly. Tailwind CSS supports that by letting you style ERB, partials, helpers, and view components without leaving the file to invent CSS names.

For product teams, that is a strong default. You can build forms, tables, dashboards, account pages, and admin screens with one styling language. Tailwind CSS also works well with Turbo and Stimulus because it stays out of behavior.

The maintenance issue shows up later. ERB gets packed with utilities. A partial that should show a simple component can become a dense strip of spacing, color, border, focus, and responsive classes.

Rails views need readable intent

Rails templates already contain paths, helpers, translations, Turbo frames, conditional rendering, and model data. Long Tailwind CSS class strings make those details harder to review.

AI tools pay the same tax. Repeated utilities consume LLM context, especially in generated view components and partials. That leaves fewer tokens for understanding routes, models, and user flows.

Rails + Tailwind CSS + daisyUI

daisyUI gives Rails a shorter UI vocabulary while keeping Tailwind CSS available.

  • Cleaner ERB: Use btn, card, table, alert, and navbar for repeated UI.

  • Hotwire stays in charge: Turbo and Stimulus manage behavior. daisyUI only styles elements.

  • Less generated noise: AI-generated Rails views can use semantic component classes instead of huge utility chains.

  • Full Tailwind CSS control: Add utilities for custom layout, spacing, and responsive detail whenever needed.

Rails keeps the server-rendered workflow. daisyUI keeps repeated interface code easier to read.

Honestly, I spent like 20% of my time writing code and 80% of time playing with Tailwind CSS and daisyUI. Really love the daisyUI themes 😍

Jiří Kratochvíl
vuejs.berlin co-organizer

The new daisyUI 5.0 is awesome! The UI components are smooth and has a lot of new goodies.

Ovi Stoica
Software Developer

daisyUI is what I use for everything now.

Pramod
Software developer

daisyUI is a great project! Grabbed the file tree component, it works great and *doesn't even use JS* - it's just using summary and details elements, very neat!

Lachlan Miller
Vue.js team

How much winning can one component library take?!?

htmx.org
high power tools for HTML

DaisyUI is really goated! I am a happy user for the past 5 years.

Nithur
Developer

Install Tailwind CSS and daisyUI for Ruby on Rails

The Rails guide starts with the Tailwind CSS Rails gem, then offers Node dependency, bundle file, and CDN options for daisyUI. The Node and bundle-file paths use @plugin "daisyui" or local daisyUI plugin files.

For the exact setup, see How to install daisyUI with Ruby on Rails.

daisyUI is the most popular
component library for Tailwind CSS

Used by engineers at

Meta Research
Alibaba
Amazon
Adobe
Pepsico
Google Cloud