1. Collections Component Guide
  2. Form radio button
  3. Inline
Form radio button example

Inline

When providing few options, radio buttons should be inline rather than stacked. We recommend this for two small options like yes and no, on and off

How it looks (preview)

How to call this example

<%= render "govuk_publishing_components/components/radio", {
  name: "inline-radios",
  inline: true,
  items: [
    {
      value: "on",
      text: "On"
    },
    {
      value: "off",
      text: "Off"
    }
  ]
} %>