Govuk Components

screenshot of Govuk Components
rails

Lightweight Ruby on Rails components for developing with the GOV.UK Design System.

Overview

The GOV.UK Components for Ruby on Rails is a robust gem designed to deliver a collection of reusable components that align with the GOV.UK Design System. Leveraging GitHub’s ViewComponent framework, this library offers a streamlined alternative to the conventional GOV.UK Publishing Components library. As a Rails developer, you'll find this approach familiar and efficient, transforming the original Nunjucks macros into easily manageable Ruby objects.

This gem not only aims to improve development maintainability but also provides a rich set of features for building web applications that comply with the GOV.UK guidelines. With comprehensive documentation and up-to-date examples, developers will have the resources they need to implement and customize components within their Rails applications effortlessly.

Features

  • Comprehensive Component Suite: Includes all non-form components from the GOV.UK Design System, such as Accordions, Breadcrumbs, Notification Banners, and more.
  • Familiar Syntax: Designed for comfort, components can be rendered using Rails’ #render method or via helper wrappers, enhancing the developer experience.
  • Full Documentation: Comes with an extensive guide that includes code and output examples to help users navigate implementation with ease.
  • Flexible Alternatives: Allows rendering in two ways, ensuring that developers can choose their preferred method for components.
  • Easy Installation: Simple setup requirements that integrate seamlessly with your existing Rails application.
  • Active Contribution: Encourages community involvement through bug reports and feature requests, adhering to GOV.UK coding standards.
  • Open Source License: Available for use under the MIT License, promoting collaboration and accessibility within the developer community.
rails
Ruby on Rails

Ruby on Rails, often referred to as Rails, is an open-source web application framework written in Ruby. Known for its convention over configuration and don't repeat yourself (DRY) principles, Rails simplifies and accelerates the development of database-backed web applications.