1. Collections Component Guide
  2. Form radio button
  3. With custom heading level
Form radio button example

With custom heading level

This allows the heading level to be changed. Heading level will default to h2 if nothing is passed.

How it looks (preview)

What is your favourite colour?

How to call this example

<%= render "govuk_publishing_components/components/radio", {
  name: "radio-group-description",
  heading: "What is your favourite colour?",
  heading_level: 3,
  items: [
      value: "red",
      text: "Red"
      value: "green",
      text: "Green"
      value: "blue",
      text: "Blue"
} %>