GOV.UK Components are suitable for use with any Rails application that uses the GOV.UK Design System. They are built using GitHub’s ViewComponent framework and are easy to distribute and reuse.
If you’re starting from scratch, the easiest way to hit the ground running is to use the DfE’s GOV.UK Rails Boilerplate.
Add the following line to your Gemfile and run
When you restart your application you should have access to the full set of
components. You make sure everything’s working by creating one in the
GovukComponent::PanelComponent.new(title_text: "Hello", text: "world!")
If you don’t see any error messages, it’s properly installed — you can start adding components to your templates.