Like shadcn for Rails: generators drop ViewComponents + ERB + plain CSS into your app. You edit the files; the gem is mainly installers + an optional /ui styleguide.
Why bother
- Your code — components live under
app/componentsandapp/assets, not inside a gem you can’t edit. - Plain CSS — design tokens, no Tailwind required.
- Dark mode — add
.darkon html or body. - Optional styleguide — mount … =>
/uifor live previews and copy-paste snippets. - Optional forms —
Ui::Form::Builderkeeps fields aligned with standalone components.
bundle add uikit_rails
bin/rails generate uikit_rails:install
bin/rails generate uikit_rails:add button card
<%= render Ui::Button::Component.new do %>Click me<% end %>
Mounts UikitRails styleguide engine at /ui so you can preview and copy code for installed components.
mount UikitRails::Engine => "/ui" # optional

Top comments (0)