Skip to main content

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

<govuk-app-section-heading>

Section heading

Heads a section of a screen, such as a widget on the home screen, with an action for the whole section beside it if it has one, such as Edit or See all.

GOV.UK app component

Examples

With an action

Topics Topics

HTML

<govuk-app-section-heading action="Edit" name="edit-topics">Topics</govuk-app-section-heading>

Without one

Your local services Your local services

HTML

<govuk-app-section-heading>Your local services</govuk-app-section-heading>

An action that links to another page

Pages you’ve visited Pages you’ve visited

HTML

<govuk-app-section-heading action="See all" href="#recent-activity">Pages you’ve visited</govuk-app-section-heading>

Inputs

Attributes
Attribute Type Default Description
level "1" | "2" | "3" | "4" | "5" | "6" 2 Its place in the screen's outline. Drawn as h1 to h6, always in Title 3.
action string The action's text, such as Edit or See all. Without it, there is no action.
href string Makes the action a link to this page.
name string The action's button's name, to tell which was pressed.
value string The action's button's value.

Content

The section's title.

Outputs

  • click: From the action's button, with its name and value, when it is pressed. An action with an href goes to its page instead.

Rules

  • Use it over a section the user can act on as a whole, such as a home screen widget. For any other heading, use the heading.
  • Give the action a short verb or phrase for what it does to the section: Edit, or See all. Never more than one action.
  • Keep the title short, so it and the action fit on one line.

When not to use it

When Use instead
For a heading with no action govuk-app-heading
For a screen's title govuk-app-heading level="1"
For a part of a long screen, with a line saying what it's for govuk-app-section
For several actions on a section govuk-app-menu-button

Sources

The iOS, Android and Figma sources it was built from
  • iOS: SectionHeaderLabelView in govuk-once/govuk-mobile-ios-gov-kit/GovKitUI/Sources/Components/Views/SectionHeaderLabelView.swift at 8a7641e
  • iOS: TopicsWidgetView in govuk-once/govuk-mobile-ios-app/Production/govuk_ios/Views/Home/Topics/TopicsWidgetView.swift at 1e520fc1
  • iOS: RecentActivityWidgetView in govuk-once/govuk-mobile-ios-app/Production/govuk_ios/Views/Home/RecentActivity/RecentActivityWidgetView.swift at 1e520fc1
  • Figma: none linked yet

In the app

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

iOS

iOS app: With an action
With an action
iOS app: Without one
Without one