Rails 7.1+ · ViewComponent · Tailwind 4
VelvetKit copies accessible ViewComponents into your app: only the ones you use, under your namespace, with their tests and previews. Your AI agent gets a reference to build with them.
10 screens, every one built from the kit and live
How it works
There's no runtime dependency to upgrade around. Once a component is copied, you, or your agent, change it like anything else in app/.
It only runs generators, so it lives in the development group.
gem "velvetkit", group: :development
Sets your namespace, adds the design tokens, and writes the reference for your agent.
bin/rails g velvetkit:install
Each component brings the ones it uses. The agent reference updates itself.
bin/rails g velvetkit:add dialog
Ask for a date picker and you get the date picker and its icon. Nothing else lands in your app.
UI::, Kit::, Admin:: or anything else. Classes, folders, Stimulus ids and translation keys all follow.
Your repo gets a reference of exactly what's installed, with working examples, in your namespace.
Native dialog, real labels, keyboard menus and tabs, and colours that pass AA in both themes.
Every page shows the code, exactly what add copies, and a Markdown version for your agent.