- iOS:
HomeViewControllerin govuk-once/govuk-mobile-ios-app/Production/govuk_ios/ViewControllers/HomeViewController.swift at 1e520fc1 - iOS:
HomeContentViewin govuk-once/govuk-mobile-ios-app/Production/govuk_ios/Views/Home/HomeContentView.swift at 1e520fc1 - iOS:
homeLogoin govuk-once/govuk-mobile-ios-app/Production/govuk_ios/Resources/Assets.xcassets/homeLogo.imageset/logo.svg at 1e520fc1 - iOS:
fills.surfaceHomeHeaderBackgroundin govuk-once/govuk-mobile-ios-gov-kit/GovKitUI/Sources/Colors/GOVUKColors+Fills.swift at 8a7641e - Android:
HomeScreenin govuk-once/govuk-mobile-android-app/feature/home/src/main/kotlin/uk/gov/govuk/home/ui/HomeScreen.kt at 9952400f - Figma: none linked yet
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.
Driving and transport. Money and tax. Benefits. Care. Health and disability. Parenting and guardianship. Employment. Business. Education and learning. Housing and local services.
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.
Driving and transport. Money and tax. Benefits. Care. Health and disability. Parenting and guardianship. Employment. Business. Education and learning. Housing and local services.
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
Driving and transport. Money and tax. Benefits. Care. Health and disability. Parenting and guardianship. Employment.
Driving and transport. Money and tax. Benefits. Care. Health and disability. Parenting and guardianship. Employment.
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
Driving and transport. Money and tax. Benefits. Care. Health and disability. Parenting and guardianship. Employment.
Driving and transport. Money and tax. Benefits. Care. Health and disability. Parenting and guardianship. Employment.
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 |
iOS
Android