Skip to main content

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

<govuk-app-home-header>

Home header

Tops the home screen: the GOV.UK wordmark on blue, and the search field the user starts a search of GOV.UK from. It takes the place of the navigation bar, which the home screen hides.

GOV.UK app component

On the home screen

Put the header first in the home screen, with a search field inside it. It stays at the top, and the screen’s content scrolls under it, starting 24pt below it, as the app’s widgets do. Scroll these to see it.

Topics

Driving and transport. Money and tax. Benefits. Care. Health and disability. Parenting and guardianship. Employment. Business. Education and learning. Housing and local services.

Pages you’ve visited

Check if you need a UK visa. Renew or replace your adult passport. Check your State Pension age. Tax your vehicle. Find out how much Income Tax you pay.

Topics

Driving and transport. Money and tax. Benefits. Care. Health and disability. Parenting and guardianship. Employment. Business. Education and learning. Housing and local services.

Pages you’ve visited

Check if you need a UK visa. Renew or replace your adult passport. Check your State Pension age. Tax your vehicle. Find out how much Income Tax you pay.

Status bar

The blue fills the status bar, as in the app. If the page draws the status bar above the root, as a phone frame usually does, the blue starts below it. To draw it under the status bar, put the root at the top of the screen and leave room for the status bar by setting --govuk-app-inset-top on the root, such as 62px for an iPhone 17 Pro:

govuk-app {
  --govuk-app-inset-top: 62px;
}

Known differences from the app

  • When the user starts searching with the phone on its side, the app hides the wordmark to make room. The header always shows it.
  • The app’s status bar is white over the blue. The header can’t set that: it is the phone frame’s to draw.

Examples

With search

Topics

Driving and transport. Money and tax. Benefits. Care. Health and disability. Parenting and guardianship. Employment.

Home Settings
Topics

Driving and transport. Money and tax. Benefits. Care. Health and disability. Parenting and guardianship. Employment.

Home Settings

HTML

<govuk-app-screen>
  <govuk-app-home-header>
    <govuk-app-search-field></govuk-app-search-field>
  </govuk-app-home-header>
  <govuk-app-section-heading action="Edit">Topics</govuk-app-section-heading>
  <p>Driving and transport. Money and tax. Benefits. Care. Health and disability. Parenting and guardianship. Employment.</p>
  <govuk-app-tab-bar>
    <govuk-app-tab-bar-item icon="home" name="home" selected>Home</govuk-app-tab-bar-item>
    <govuk-app-tab-bar-item icon="settings" name="settings">Settings</govuk-app-tab-bar-item>
  </govuk-app-tab-bar>
</govuk-app-screen>

Without search

Topics

Driving and transport. Money and tax. Benefits. Care. Health and disability. Parenting and guardianship. Employment.

Home Settings
Topics

Driving and transport. Money and tax. Benefits. Care. Health and disability. Parenting and guardianship. Employment.

Home Settings

HTML

<govuk-app-screen>
  <govuk-app-home-header></govuk-app-home-header>
  <govuk-app-section-heading action="Edit">Topics</govuk-app-section-heading>
  <p>Driving and transport. Money and tax. Benefits. Care. Health and disability. Parenting and guardianship. Employment.</p>
  <govuk-app-tab-bar>
    <govuk-app-tab-bar-item icon="home" name="home" selected>Home</govuk-app-tab-bar-item>
    <govuk-app-tab-bar-item icon="settings" name="settings">Settings</govuk-app-tab-bar-item>
  </govuk-app-tab-bar>
</govuk-app-screen>

Inputs

It takes no attributes.

Content

Optionally, a <govuk-app-search-field>, drawn below the wordmark, as on the app's home screen. Without one, the header is the wordmark alone, as when the app's search is turned off.

Outputs

None.

Rules

  • Use it only on the home screen, in place of a navigation bar. Other screens have a navigation bar.
  • Put it first in a <govuk-app-screen>. It sticks to the top of the screen, and the content scrolls under it.
  • Give it a search field, as the app does, unless the prototype is of the app without search.
  • The wordmark is the screen's heading, so don't give the home screen another level 1 heading.

When not to use it

When Use instead
On any screen but Home govuk-app-nav-bar
To search on a screen other than Home govuk-app-search-field

Sources

The iOS, Android and Figma sources it was built from
  • iOS: HomeViewController in govuk-once/govuk-mobile-ios-app/Production/govuk_ios/ViewControllers/HomeViewController.swift at 1e520fc1
  • iOS: HomeContentView in govuk-once/govuk-mobile-ios-app/Production/govuk_ios/Views/Home/HomeContentView.swift at 1e520fc1
  • iOS: homeLogo in govuk-once/govuk-mobile-ios-app/Production/govuk_ios/Resources/Assets.xcassets/homeLogo.imageset/logo.svg at 1e520fc1
  • iOS: fills.surfaceHomeHeaderBackground in govuk-once/govuk-mobile-ios-gov-kit/GovKitUI/Sources/Colors/GOVUKColors+Fills.swift at 8a7641e
  • Android: HomeScreen in govuk-once/govuk-mobile-android-app/feature/home/src/main/kotlin/uk/gov/govuk/home/ui/HomeScreen.kt at 9952400f
  • Figma: none linked yet

In the app

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

iOS

iOS app: The home screen's header, with search, in light mode
The home screen's header, with search, in light mode
iOS app: The home screen's header, with search, in dark mode
The home screen's header, with search, in dark mode

Android

Android app: The Android home screen's header, the wordmark alone, in light mode
The Android home screen's header, the wordmark alone, in light mode