- iOS:
GOVUKFontBuilderin govuk-once/govuk-mobile-ios-gov-kit/GovKitUI/Sources/Styles/Font+Extensions.swift at 8a7641e - iOS:
HeaderView, its subheadingin govuk-once/govuk-mobile-ios-app/Production/govuk_ios/SwiftUIViews/HeaderView.swift at 1e520fc1 - iOS:
ListCardView, its secondary textin govuk-once/govuk-mobile-ios-app/Production/govuk_ios/SwiftUIViews/ListCardView.swift at 1e520fc1 - iOS:
ServiceAccountConsentView, its descriptions in Title 1in govuk-once/govuk-mobile-ios-app/Production/govuk_ios/Views/ServiceAccount/ServiceAccountConsentView.swift at fc2b3b1d - Figma: none linked yet
- Apple Human Interface Guidelines: Typography, the text styles
- The app prototyping system's body text, which this follows (app-prototyping-system, exploration-2/kit/components/body)
Text
A paragraph of the app's text: Body, as most of it is, or a smaller style for details such as dates, captions and supporting information.
Native component
Examples
A paragraph
HTML
<govuk-app-text>If you’re using Face ID or Touch ID to unlock the app, this will be turned off. You can turn it on again the next time you sign in.</govuk-app-text>
Each size
HTML
<govuk-app-text>Body</govuk-app-text>
<govuk-app-text size="callout">Callout</govuk-app-text>
<govuk-app-text size="subheadline">Subheadline</govuk-app-text>
<govuk-app-text size="footnote">Footnote</govuk-app-text>
<govuk-app-text size="caption-1">Caption 1</govuk-app-text>
<govuk-app-text size="caption-2">Caption 2</govuk-app-text>
Emphasised, and secondary
HTML
<govuk-app-text emphasis>Your MOT expires on 14 March 2027</govuk-app-text>
<govuk-app-text size="subheadline" colour="secondary">Last checked today at 9:41am</govuk-app-text>
Centred, under a centred heading
HTML
<govuk-app-text align="center">Find out about things like important dates and deadlines, services you might find useful and new features that have been added to the app.</govuk-app-text>
Inputs
| Attribute | Type | Default | Description |
|---|---|---|---|
size |
"title-1" | "body" | "callout" | "subheadline" | "footnote" | "caption-1" | "caption-2" |
body |
The text style it is drawn in. title-1 is Title 1, regular, larger than Body, as the app sets the text on its green screens. |
emphasis |
boolean |
false |
Draws it semibold, as GovKit's bodySemibold and the like. |
colour |
"primary" | "secondary" |
primary |
secondary: grey, text.secondary, for supporting text such as a date or a hint. |
align |
"start" | "center" |
start |
center, under a centred heading, as on the app's onboarding and information screens. |
Content
The paragraph's text. A few words of it can be bold, in a <govuk-app-strong>.
Outputs
None.
Rules
- Use Body for a screen's text. Use a smaller style only for supporting details, as the app does: Subheadline or Footnote for a date or a label, Caption for the smallest notes.
- Use Title 1 only for the few lines of a screen that takes over the app, such as a green one, as the app does.
- Use one text element for each paragraph. A screen spaces them 16pt apart.
- Use emphasis sparingly, for a word or line that has to stand out. For a heading, use the heading.
- Use the secondary colour only for supporting text, never for something the user must read to act.
- Centre text only under a centred heading.
When not to use it
| When | Use instead |
|---|---|
| For a screen's title, or a section's | govuk-app-heading |
| For a few words that say what the rest of a line is | govuk-app-strong |
| For a few points that are read together | govuk-app-bulleted-list |
| For a name and postal address | govuk-app-address |
| For something the user should know now, set apart from the screen | govuk-app-banner |
The iOS, Android and Figma sources it was built from
Screenshots of the app's own component, to compare the examples with
iOS