Form label example

With custom label size

Make the label different sizes. Valid options are ‘s’, ‘m’, ‘l’ and ‘xl’.

How it looks (preview)

How to call this example

<%= render "govuk_publishing_components/components/label", {
  text: "Surname",
  html_for: "id-that-matches-input-2",
  heading_size: "xl"
} %>