Skip to main content

These components are for prototyping the GOV.UK app, not for use in production.

<govuk-app-heading>

Heading

Titles a screen, or a section of one. Its level says where it sits in the screen's outline, for screen readers; its size, which of the app's text styles it is drawn in.

Native component

Examples

Each size

Large Title Title 1 Title 2 Title 3 Body Large Title Title 1 Title 2 Title 3 Body

HTML

<govuk-app-heading level="1" size="large-title">Large Title</govuk-app-heading>
<govuk-app-heading level="1" size="title-1">Title 1</govuk-app-heading>
<govuk-app-heading level="2" size="title-2">Title 2</govuk-app-heading>
<govuk-app-heading level="2" size="title-3">Title 3</govuk-app-heading>
<govuk-app-heading level="3" size="body">Body</govuk-app-heading>

A screen's question

Are you sure you want to sign out? Are you sure you want to sign out?

HTML

<govuk-app-heading level="1" size="title-1">Are you sure you want to sign out?</govuk-app-heading>

Centred, on an onboarding screen

Allow notifications? Allow notifications?

HTML

<govuk-app-heading level="1" align="center">Allow notifications?</govuk-app-heading>

Sizes by level, when none is given

Your local council Bins and recycling Collection days Your local council Bins and recycling Collection days

HTML

<govuk-app-heading level="1">Your local council</govuk-app-heading>
<govuk-app-heading level="2">Bins and recycling</govuk-app-heading>
<govuk-app-heading level="3">Collection days</govuk-app-heading>

Inputs

Attributes
Attribute Type Default Description
level "1" | "2" | "3" | "4" | "5" | "6" 2 Its place in the screen's outline: 1 is the screen's title, 2 a section of it, 3 a part of a section. Drawn as h1 to h6.
size "large-title" | "title-1" | "title-2" | "title-3" | "body" The text style it is drawn in. Without one, level 1 is Large Title, level 2 is Title 3, and anything smaller is Body, emphasised.
align "start" | "center" start center, as the app's onboarding and information screens set their titles.

Content

The heading's text.

Outputs

None.

Rules

  • Give every screen one level 1 heading, unless its navigation bar has a title, which is the screen's heading instead.
  • Don't skip levels: a level 3 heading goes inside a section with a level 2 one.
  • Pick the level for the outline and the size for the look. A screen's question, such as What is your postcode?, is level 1 in Title 1; an outcome, such as a confirmation, is level 1 in Large Title.
  • Centre a heading only on screens the app centres: onboarding, information and confirmation screens. Centre the text under it too.
  • Write headings in sentence case, without a full stop. A question ends with a question mark.

When not to use it

When Use instead
Over a section the user can act on as a whole, such as a widget with Edit govuk-app-section-heading
For a part of a long screen, with its title and the space above it govuk-app-section
For a title over a list of rows govuk-app-grouped-list title="Privacy and legal"
For a screen's title, when it has a navigation bar govuk-app-nav-bar title="Settings"
For a line that should stand out, but doesn't head anything govuk-app-text emphasis
For a few words that say what the rest of a line is govuk-app-strong

Sources

The iOS, Android and Figma sources it was built from

In the app

Screenshots of the app's own component, to compare the examples with

iOS

iOS app: Title 1, bold: the sign-out confirmation's title, in light mode
Title 1, bold: the sign-out confirmation's title, in light mode
iOS app: Title 1, bold, in dark mode
Title 1, bold, in dark mode
iOS app: Large Title, bold and centred: Allow notifications?
Large Title, bold and centred: Allow notifications?