With legend
Legend text is automatically wrapped inside a h2
. To render the text without it, heading_level
must be set to 0
.
How it looks (preview)
How to call this example
<%= render "govuk_publishing_components/components/radio", {
name: "radio-group-legend",
heading: "What's it to do with?",
heading_level: 0,
items: [
{
value: "yes",
text: "Yes"
},
{
value: "no",
text: "No"
}
]
} %>