Common options
The components included in this library share some common options, classes
and html_attributes
.
These arguments work consistently across all the components and slots.
Inset text with custom CSS classes
Every component, slot and helper has its own classes to make it look and work like
a GOV.UK Design System component. We can add extra classes to customise for
our projects by using the classes
keyword argument. The built-in and provided
classes are combined and all will be present in the rendered component.
Classes can be provided in an array or a space-separated string.
Inset text with custom HTML attributes
HTML attributes work in a similar fashion to classes but the html_attributes
argument must be a hash.
You can use the Rails convention
of nesting aria
and data
attributes and they’ll be set properly.