Ruby on Rails component library
Use daisyUI as a Tailwind CSS component library for Ruby on Rails projects
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, andalertkeep 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.
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