- iOS:
GroupedListSectionViewin govuk-once/govuk-mobile-ios-gov-kit/GovKit/Sources/SwiftUIViews/GroupedList/GroupedListSectionView.swift at 8a7641e - iOS:
GroupedListRowViewin govuk-once/govuk-mobile-ios-gov-kit/GovKit/Sources/SwiftUIViews/GroupedList/GroupedListRowView.swift at 8a7641e - iOS:
GroupedListSection, and its rowsin govuk-once/govuk-mobile-ios-gov-kit/GovKit/Sources/ViewModels/GroupedListSection.swift at 8a7641e - iOS:
SettingsViewin govuk-once/govuk-mobile-ios-app/Production/govuk_ios/Views/Settings/SettingsView.swift at 1e520fc1 - iOS:
addVehiclesSmallCard, the action rowin govuk-once/govuk-mobile-ios-app/Production/govuk_ios/Views/DVLA/VehiclesView.swift at 8f1fe5da - iOS:
TopicListItemViewin govuk-once/govuk-mobile-ios-app/Production/govuk_ios/SwiftUIViews/Topics/TopicListItemView.swift at fc2b3b1d - iOS:
TopicsWidgetViewin govuk-once/govuk-mobile-ios-app/Production/govuk_ios/Views/Home/Topics/TopicsWidgetView.swift at fc2b3b1d - Android:
IconListItemin govuk-once/govuk-mobile-android-app/design/src/main/kotlin/uk/gov/govuk/design/ui/component/List.kt at 9952400f - Android:
TopicsWidgetin govuk-once/govuk-mobile-android-app/feature/topics/src/main/kotlin/uk/gov/govuk/topics/ui/widget/TopicsWidget.kt at 9952400f - Figma: GOV.UK app library v2: topic icons
- Material Symbols, the icons it draws
Grouped list
A section of rows on a rounded card, as on the Settings screen: rows that go to another screen, open a web page, switch something on or off, or show a value. Each section can have a title above it and a footer below.
GOV.UK app component
Icons
The app’s rows use SF Symbols, which may only be used on Apple’s platforms, so the list draws Material Symbols instead: chevron_right for a navigation row and arrow_outward for a link. A selectable row draws whichever symbol it names as its icon, such as check or more_horiz.
Topics
A topic row draws its icon on the left, white on a blue circle, as the Topics widget on Home does. The app’s own topic icons are Material Symbols, filled, so these are the same ones, from Material Symbols Outlined:
| Topic | icon |
|---|---|
| Benefits | currency_pound |
| Business | business_center |
| Care | favorite |
| Driving | directions_car |
| Employment | assignment |
| Health | local_hospital |
| Money | pie_chart |
| Parenting | escalator_warning |
| Retirement | chair |
| Studying | import_contacts |
| Travel | travel |
Without an icon, it draws star, as the app does for a topic it has no icon for.
Images
An information or link row can draw a picture on its left, at its own size, with image giving its URL, as Settings draws One Login’s account icon beside the user’s email. This component’s folder has that icon, as images/one-login.svg:
<govuk-app-grouped-list-row type="information" description="test@example.com" image="components/grouped-list/images/one-login.svg">Your GOV.UK One Login</govuk-app-grouped-list-row>
Screen readers don’t hear the image: say what it shows in the row’s title.
The app also draws an image on a topic’s step-by-step guides, with its own version for dark mode. That one isn’t here yet: an image can’t follow colour-scheme from one picture to another.
Proposed additions
These come from the future driving designs, not the app, which we have only as a screenshot for now. They may change, or never ship.
- A content row holds anything, such as a vehicle’s name and model, or summary columns with
flush. The divider between rows is drawn as for any other row. - The accent background, a stronger blue, for a card that’s a single action, as the designs draw Add vehicle. In the app today it’s white.
- Full-width dividers, with
dividers="full": right across the card, in a paler blue, as the designs’ vehicle cards have. GovKit’s are 16pt in from each side.
Action rows
An action row is the app’s Add vehicle card (VehiclesView): its title, with an outlined plus on the right. The plus is drawn here rather than from the icon font, whose icons are all filled. Give it an icon to draw a Material Symbol instead.
Known differences from the app
- GovKit’s rows can have an image on the left, as Your GOV.UK One Login does on Settings. These can’t yet.
- GovKit can draw a section’s title in a coloured band at the top of the card, with an icon. This can’t yet.
- A count row can’t yet show the spinner the app shows while it loads.
- A toggle row’s switch is the toggle, with its differences from the app.
- The chevron is a little lighter than SF’s.
- On iOS the topic icons are images with their circle drawn in. These draw the circle and the symbol separately, as Android does.
Examples
Every kind of row
HTML
<govuk-app-grouped-list title="Section 1 header" footer="Footer">
<govuk-app-grouped-list-row name="row-1">Row title 1</govuk-app-grouped-list-row>
<govuk-app-grouped-list-row type="link" href="https://www.gov.uk">Row title 2</govuk-app-grouped-list-row>
<govuk-app-grouped-list-row type="information" detail="Detail" description="Body text">Row title 3</govuk-app-grouped-list-row>
<govuk-app-grouped-list-row type="toggle" name="row-4" checked>Row title 4</govuk-app-grouped-list-row>
<govuk-app-grouped-list-row type="detail" detail="Body text" name="row-5">Row title 5</govuk-app-grouped-list-row>
<govuk-app-grouped-list-row type="count" detail="1" unread name="row-6">Row title 6</govuk-app-grouped-list-row>
<govuk-app-grouped-list-row type="selectable" icon="check" name="row-7">Row title 7</govuk-app-grouped-list-row>
</govuk-app-grouped-list>
Settings
HTML
<govuk-app-screen>
<govuk-app-nav-bar title="Settings" large-title></govuk-app-nav-bar>
<govuk-app-grouped-list footer="You might need to sign in again to manage your GOV.UK One Login details.">
<govuk-app-grouped-list-row type="information" description="test@example.com" image="/components/grouped-list/images/one-login.svg">Your GOV.UK One Login</govuk-app-grouped-list-row>
<govuk-app-grouped-list-row type="link" href="https://home.account.gov.uk">Manage your GOV.UK One Login</govuk-app-grouped-list-row>
</govuk-app-grouped-list>
<govuk-app-grouped-list>
<govuk-app-grouped-list-row name="accounts">Your accounts</govuk-app-grouped-list-row>
</govuk-app-grouped-list>
<govuk-app-grouped-list>
<govuk-app-grouped-list-row type="count" detail="2" unread name="messages">Messages</govuk-app-grouped-list-row>
</govuk-app-grouped-list>
<govuk-app-grouped-list footer="You can share statistics about how you use the GOV.UK app so we can make improvements to it. We will not use these statistics to directly identify you.">
<govuk-app-grouped-list-row type="detail" detail="Off" name="notifications">Notifications</govuk-app-grouped-list-row>
<govuk-app-grouped-list-row name="face-id">Face ID</govuk-app-grouped-list-row>
<govuk-app-grouped-list-row type="toggle" name="statistics" checked>Share app usage statistics</govuk-app-grouped-list-row>
</govuk-app-grouped-list>
<govuk-app-grouped-list>
<govuk-app-grouped-list-row type="information" detail="1.2.3 (123)">App version number</govuk-app-grouped-list-row>
<govuk-app-grouped-list-row type="link" href="https://www.gov.uk/contact/govuk-app">Help and feedback</govuk-app-grouped-list-row>
</govuk-app-grouped-list>
</govuk-app-screen>
Topics, with a segmented control
HTML
<govuk-app-grouped-list title="Topics" action="Edit" name="edit-topics">
<govuk-app-segmented-control slot="control" label="Topics">
<govuk-app-segmented-control-item name="your-topics" selected>Your topics</govuk-app-segmented-control-item>
<govuk-app-segmented-control-item name="all-topics">All topics</govuk-app-segmented-control-item>
</govuk-app-segmented-control>
<govuk-app-grouped-list-row type="topic" icon="currency_pound" name="topic" value="benefits">Benefits</govuk-app-grouped-list-row>
<govuk-app-grouped-list-row type="topic" icon="directions_car" name="topic" value="driving">Driving</govuk-app-grouped-list-row>
<govuk-app-grouped-list-row type="topic" icon="travel" name="topic" value="travel">Travel abroad</govuk-app-grouped-list-row>
<govuk-app-grouped-list-row type="topic" name="topic" value="other">A topic without an icon</govuk-app-grouped-list-row>
</govuk-app-grouped-list>
A title with an action
HTML
<govuk-app-grouped-list title="Pages you’ve visited" action="See all" href="#recent-activity">
<govuk-app-grouped-list-row type="link" href="https://www.gov.uk/check-uk-visa">Check if you need a UK visa</govuk-app-grouped-list-row>
<govuk-app-grouped-list-row type="link" href="https://www.gov.uk/vehicle-tax" description="Visited today">Tax your vehicle</govuk-app-grouped-list-row>
</govuk-app-grouped-list>
A destructive detail row
HTML
<govuk-app-grouped-list>
<govuk-app-grouped-list-row type="detail" destructive name="sign-out">Sign out</govuk-app-grouped-list-row>
</govuk-app-grouped-list>
Proposed: a vehicle's card, with content rows
HTML
<govuk-app-grouped-list>
<govuk-app-grouped-list-row type="content">
<govuk-app-heading level="2" size="title-2">Lamborghini</govuk-app-heading>
<govuk-app-text size="subheadline">Aventador LP 770-4 Super Veloce Jota 63 Edition Roadster</govuk-app-text>
</govuk-app-grouped-list-row>
<govuk-app-grouped-list-row type="content" flush>
<govuk-app-summary-columns>
<govuk-app-summary-column>
<govuk-app-status state="due" progress="0.6" label="Tax due" caption="18 days"></govuk-app-status>
</govuk-app-summary-column>
<govuk-app-summary-column>
<govuk-app-status label="MOT" caption="Valid"></govuk-app-status>
</govuk-app-summary-column>
</govuk-app-summary-columns>
</govuk-app-grouped-list-row>
<govuk-app-grouped-list-row name="details">Details</govuk-app-grouped-list-row>
</govuk-app-grouped-list>
An action row, as Add vehicle
HTML
<govuk-app-grouped-list>
<govuk-app-grouped-list-row type="action" name="add-vehicle">Add vehicle</govuk-app-grouped-list-row>
</govuk-app-grouped-list>
Proposed: the accent background, for Add vehicle
HTML
<govuk-app-grouped-list background="accent">
<govuk-app-grouped-list-row type="action" name="add-vehicle">Add vehicle</govuk-app-grouped-list-row>
</govuk-app-grouped-list>
Links without arrows
HTML
<govuk-app-grouped-list title="Related">
<govuk-app-grouped-list-row type="link" no-arrow href="https://www.gov.uk/personalised-vehicle-registration-numbers">Personalised number plates</govuk-app-grouped-list-row>
<govuk-app-grouped-list-row type="link" no-arrow href="https://www.gov.uk/vehicle-insurance">Vehicle insurance</govuk-app-grouped-list-row>
</govuk-app-grouped-list>
The subtle background, on a white screen
HTML
<govuk-app-screen background="modal">
<govuk-app-grouped-list title="Overview" background="subtle">
<govuk-app-grouped-list-row type="content" flush>
<govuk-app-summary-columns>
<govuk-app-summary-column>
<govuk-app-labelled-icon icon="calendar_month">2017</govuk-app-labelled-icon>
</govuk-app-summary-column>
<govuk-app-summary-column>
<govuk-app-labelled-icon icon="local_gas_station">Bi-fuel</govuk-app-labelled-icon>
</govuk-app-summary-column>
<govuk-app-summary-column>
<govuk-app-labelled-icon icon="palette">Red</govuk-app-labelled-icon>
</govuk-app-summary-column>
</govuk-app-summary-columns>
</govuk-app-grouped-list-row>
<govuk-app-grouped-list-row name="tech-specs">Tech specs</govuk-app-grouped-list-row>
</govuk-app-grouped-list>
</govuk-app-screen>
Proposed: full-width dividers, as a vehicle's card
HTML
<govuk-app-grouped-list dividers="full">
<govuk-app-grouped-list-row type="content">
<govuk-app-heading level="2" size="title-1">Volkswagen</govuk-app-heading>
<govuk-app-text>ID4 2.0</govuk-app-text>
</govuk-app-grouped-list-row>
<govuk-app-grouped-list-row type="information" detail="Valid">Tax</govuk-app-grouped-list-row>
<govuk-app-grouped-list-row name="details">Details</govuk-app-grouped-list-row>
</govuk-app-grouped-list>
Inputs
| Attribute | Type | Default | Description |
|---|---|---|---|
title |
string |
The section's title, above the card. Without it, the card stands alone, as on Settings. | |
level |
"1" | "2" | "3" | "4" | "5" | "6" |
2 |
The title's place in the screen's outline. Drawn as h1 to h6, always in Title 3. |
action |
string |
Text for an action beside the title, such as See all. | |
href |
string |
Makes the title's action a link to this page. | |
name |
string |
The title's action's button's name. | |
value |
string |
The title's action's button's value. | |
footer |
string |
A note below the card, in Footnote, such as what a setting does. | |
dividers |
"full" |
Proposed, from the future driving designs: full draws the dividers between rows right across the card, in a paler blue, for a card whose rows are parts of one thing, such as a vehicle, rather than a list. Without it, they're GovKit's, 16pt in from each side. | |
background |
"subtle" | "accent" |
Draws the card in another colour, as GovKit lets the app: subtle, pale blue, for a card on a white screen; accent, a stronger blue, proposed by the future driving designs for Add vehicle. Without it, the card is white, or dark blue in dark mode. |
Content
The section's rows, <govuk-app-grouped-list-row> elements, in order. Each takes a type: navigation (the default: a chevron, to another screen), link (in the link colour, with an arrow out, to a web page), information (a value on the right, in grey, that can't be pressed), detail (a value on the right in the link colour, such as Off, to change it; destructive draws its title red), toggle (a switch, drawn by <govuk-app-toggle>; checked if it is on), count (a number on the right, with unread for a red dot) selectable (an icon on the right, if it names one, such as check) or topic (a navigation row with its icon on the left, in a circle, and its title in bold; icon names the symbol, such as currency_pound, or it draws a star). detail gives the value on the right; description, for information and link rows, a line of grey text below the title. Give href to make a row a link, or name and value to tell it apart as a button or switch. Its title is what is written between its tags. A link row with no-arrow has no arrow, as GovKit can draw one for a link that stays in the app. An action row is a single action, as the app's Add vehicle: its title, with an outlined plus on the right in the icon colour, or the icon it names. Anything given slot="control", such as a segmented control, goes at the top of the card, above the rows, as the app's Topics widget has Your topics and All topics. An information or link row given an image, the URL of a picture, draws it on the left at its own size, as the app draws One Login's account icon on Settings (images/one-login.svg, in this component's folder). Proposed, from the future driving designs: content (anything written between its tags, such as a heading and text, 16pt in from the card's edges; with flush, none, for content with its own padding, such as summary columns).
Outputs
click: From a row's button, with its name and value, when it is pressed. A row with an href goes to its page instead.change: From a toggle row's switch, a checkbox with its name and value, when it is switched. Read event.target.checked for whether it is on.
Rules
- Group rows that belong together in one section, and give each section a title unless the screen makes it obvious, as Settings does.
- Use navigation for a row that goes to another screen in the app, and link only for one that opens a web page.
- Use toggle for a setting that takes effect straight away. Use detail for one that is changed on another screen, showing its value, such as Off.
- Use information for a value the user can't change, such as the app's version.
- Keep row titles to one line where you can, and put any explanation in the section's footer, not the row.
- Use destructive only for a detail row that deletes or removes something, such as Sign out.
- Use topic only for a list of the app's topics, as on Home, with the topic's own icon.
- Use a content row for what a row type can't draw, such as a vehicle's name and its tax and MOT, and put anything more about it, such as Details, in a navigation row below. It's proposed, so isn't in the app yet.
- Use the subtle background for cards on a white screen, so they stand apart from it. The accent background is proposed, for a card that's a single action, such as Add vehicle.
- Use an action row on a card of its own, for an action that adds to the list above it, as Add vehicle does.
When not to use it
| When | Use instead |
|---|---|
| For a few points that are read together, and can't be tapped | govuk-app-bulleted-list |
| For one destination that should stand out, such as the user's council | govuk-app-link-card |
| For the action that moves the journey on | govuk-app-button variant="primary" |
| To switch between views of the same thing, such as Vehicles and Licence | govuk-app-segmented-control |
| For two to four short facts of the same kind, side by side | govuk-app-summary-columns |
iOS
Android