1. Collections Component Guide
  2. Form radio button
  3. With custom id attribute
Form radio button example

With custom id attribute

How it looks (preview)

How to call this example

<%= render "govuk_publishing_components/components/radio", {
  name: "radio-group",
  id: "radio-group",
  items: [
    {
      value: "government-gateway",
      text: "Use Government Gateway"
    },
    {
      value: "govuk-verify",
      text: "Use GOV.UK Verify"
    }
  ]
} %>