1. 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)

Have you changed your name?

How to call this example

<%= render "govuk_publishing_components/components/radio", {
  heading: "Have you changed your name?",
  name: "inline-radios",
  inline: true,
  items: [
    {
      value: "yes",
      text: "Yes"
    },
    {
      value: "no",
      text: "No"
    }
  ]
} %>