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.

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

I love daisyUI and we used it for a hackathon project last week

Loftwah
DevOps Engineer

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

Dev Ed
Content Creator

I used daisyUI theme generator's Halloween theme and tweaked it to what I want and now, I'm so proud of what I've got!

Ade
Software Engineer

I'm glad I found daisyUI. daisyUI is built with Tailwind CSS which makes it perfect fit for me.

Rem Kim
Founder of resolveai.co

daisyUI is the only way to use tailwind

Suspect
Dev

I found daisyUI to be an amazing pair with htmx

Ryan Dsouza
DevOps enthusiast

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