Form fieldset example

With custom legend size

Make the legend different sizes. Valid options are s, m, l and xl.

How it looks (preview)

Do you have a driving license?

How to call this example

<%= render "govuk_publishing_components/components/fieldset", {
  legend_text: "Do you have a driving license?",
  heading_size: "l"
} do %>
  <!-- example content -->
  <%= render "govuk_publishing_components/components/radio", {
    name: "size",
    items: [
      {
        value: "size-yes",
        text: "Yes"
      },
      {
        value: "size-no",
        text: "No"
      }
    ]
  } %>
  <!-- end of example content -->
<% end %>