Form radio button example

With page heading and caption

A caption can be added using the heading_caption option. Captions will only be displayed if text for the heading option is present.

The pattern is used across GOV.UK to show a high-level section that this page belongs to.

How it looks (preview)

Question 3 of 9

Is it snowing?

How to call this example

<%= render "govuk_publishing_components/components/radio", {
  name: "radio-group-heading",
  heading: "Is it snowing?",
  heading_caption: "Question 3 of 9",
  heading_level: 1,
  items: [
    {
      value: "yes",
      text: "Yes"
    },
    {
      value: "no",
      text: "No"
    }
  ]
} %>