daisyUI v5.6 is now available!

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.

  • : 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.

Been using daisyUI for a while and I must say...such a fun addon for Tailwind CSS, well done 🔥

Dev Ed
Content Creator

*Love daisyUI*, excited to use it again on my next job

Steve Williams
Applications developer

I've been *enjoying daisyui* since I discovered it very recently, great job!

Vincent Bergeron
Software Developer

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

Ovi Stoica
Software Developer

If you want to *build beautiful apps in no time* daisyUI is the way to go ✨ I've been using it for the past 6 months and can't imagine living without it...

Marc Lou
Solopreneur

daisyUI is what I use for everything now.

Pramod
Software 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