1. Component Guide
  2. Search
  3. Wrap label inside a heading
Search example

Wrap label inside a heading

Puts the label inside a heading; heading level defaults to 2 if not set.

(The size of the label can still be set with label_size to appear more like a heading.)

How it looks (preview)

How to call this example

<%= render "govuk_publishing_components/components/search", {
  wrap_label_in_a_heading: true,
  heading_level: 1
} %>