daisyUI v5.6 is now available!

Ruby on Rails component library

Use daisyUI as a Tailwind CSS component library for Ruby on Rails projects

Best Rails component library

Ruby on Rails

Ruby on Rails is a full-stack web framework built around convention over configuration.

Rails gives you routing, controllers, views, models, migrations, mailers, jobs, caching, testing, and asset tooling in one cohesive framework. That makes it a strong choice for teams that want to ship server-rendered product features without assembling a custom stack for every project.

Rails also pairs well with progressive enhancement. ERB, Turbo, Stimulus, and Hotwire let you build responsive interfaces while keeping much of the application flow on the server.

Ruby on Rails + daisyUI

daisyUI works well with Rails because it styles regular HTML. You can use it in ERB templates, partials, Rails view components, Turbo frames, and Stimulus-driven interactions.

That gives Rails apps a useful UI layer:

  • Readable ERB: btn, card, navbar, table, and alert keep view templates easier to understand.

  • Hotwire-friendly styling: Turbo and Stimulus can manage updates and behavior while daisyUI handles the component appearance.

  • No extra JavaScript framework required: daisyUI doesn't force React, Vue, or a browser-side component runtime into your Rails app.

  • Themeable screens: Apply a theme at the layout level and reuse it across admin panels, dashboards, and customer-facing views.

Rails keeps the application structure opinionated. daisyUI gives the views a consistent set of styled components.

I Love daisyUI

Guillaume Meyer
Entrepreneur

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

Been a big fan on daisyUI for 2 years, kudos to your great work! 👏👏

Kenn Ejima
Co-Founder & CTO

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

Vincent Bergeron
Software Developer

daisyUI is the missing part from Tailwind CSS which is the perfect choice for devs who need easy UI design

Mahdi M
Software developer

I think daisyUI is very cool, it's *easy to use* and you can build a clean UI with it. 👍 😁

Nihad
Frontend Software Engineer

Install Tailwind CSS and daisyUI for Ruby on Rails

Rails can use daisyUI through the Tailwind CSS Rails setup or with standalone CSS files.

For the Tailwind CSS path, install daisyUI and add @plugin "daisyui" to the stylesheet that imports Tailwind CSS.

After the CSS builds, use daisyUI classes in ERB, partials, helpers, and view components.

For Rails-specific installation options, 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