Search example

With margin bottom for the label

Allows the spacing between the label and the input be adjusted.

Requires inline_label to be false.

This accepts a number from 0 to 9 (0px to 60px) using the GOV.UK Frontend spacing scale. It defaults to having no margin bottom.

How it looks (preview)

How to call this example

<%= render "govuk_publishing_components/components/search", {
  label_margin_bottom: 9,
  inline_label: false
} %>