1. Component Guide
  2. Form fieldset
  3. With heading
Form fieldset example

With heading

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_level: 2,
  heading_size: "m"
} do %>
  <!-- Use the radio component, this is hardcoded only for this example -->
  <input type="radio" id="level-yes" name="default">
  <label for="level-yes">Yes</label>

  <input type="radio" id="level-no" name="default">
  <label for="level-no">No</label>
<% end %>