1. Collections Component Guide
  2. Heading
  3. With mobile top margin
Heading example

With mobile top margin

On publications and consultations the layout of the page requires that the heading component have spacing above it on mobile. Since this is a specific use case, this is now an option on the component rather than the default behaviour.

It is intended that this option will ultimately be deprecated once more of the frontend is componentised and a general component model of margins is implemented.

How it looks (preview)

Consultation description

How to call this example

<%= render "govuk_publishing_components/components/heading", {
  text: "Consultation description",
  mobile_top_margin: true
} %>