Lookbook
A component workshop for ViewComponent, Phlex and plain partials
No ratings yet
- Gem
- lookbook
- Repository
- lookbook-hq/lookbook
- License
- MIT
- Stars
- 1,100
- Added
- July 22, 2026
About
A UI development environment for Rails: browse your components, change their
parameters live, and read their documentation.
What you get
- Previews for ViewComponent, Phlex and Action View partials
- Dynamic parameters, so you can change a component's inputs in the browser
- Notes and annotations rendered as documentation
- Inspector panels showing the source and the rendered output
- Live reload while you edit
Mounting it
ruby
# Gemfile
group :development do
gem "lookbook"
end
# config/routes.rb
mount Lookbook::Engine, at: "/lookbook" if Rails.env.development?
Why this and not Storybook
Storybook is excellent and it is built for JavaScript components. Getting it to
render a Rails partial means running a second server and duplicating your markup.
Lookbook renders the real view, in the real app, with the real helpers.
Discussion (0)
Sign in to join the discussion.
No comments yet.