Skip to main content

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

<govuk-app-link>

Link

Makes a few words of a line a link, such as a GOV.UK page named in one of GOV.UK Chat's answers.

GOV.UK app component

Examples

In a sentence

You can apply for or renew your passport online. You can apply for or renew your passport online.

HTML

<govuk-app-text>You can <govuk-app-link href="https://www.gov.uk/apply-renew-passport">apply for or renew your passport online</govuk-app-link>.</govuk-app-text>

In a list

you need a digital photo start your online application you need a digital photo start your online application

HTML

<govuk-app-bulleted-list spacing="compact">
  <govuk-app-bulleted-list-item>you need a <govuk-app-link href="https://www.gov.uk/photos-for-passports">digital photo</govuk-app-link></govuk-app-bulleted-list-item>
  <govuk-app-bulleted-list-item><govuk-app-link href="https://www.gov.uk/apply-renew-passport">start your online application</govuk-app-link></govuk-app-bulleted-list-item>
</govuk-app-bulleted-list>

Inputs

Attributes
Attribute Type Default Description
href string Where it goes, such as a GOV.UK page.

Content

The words that are the link. Put it inside a <govuk-app-text> or a <govuk-app-bulleted-list-item>, around the words, and it takes that text's size.

Outputs

  • click: From the link it draws, when it's pressed, before it goes to its href.

Rules

  • Make the link's words say where it goes, such as the page's title, not click here.
  • Use it inside a line of text. For a link on a row of its own, use a grouped list's link row, or a link card for one that should stand out.

When not to use it

When Use instead
For a link on a row of its own govuk-app-grouped-list-row type="link"
For one destination that should stand out, such as the user's council govuk-app-link-card
For an action, such as continuing a journey govuk-app-button

Sources

The iOS, Android and Figma sources it was built from
  • iOS: Theme.govUK, .link in govuk-once/govuk-mobile-ios-app/Production/govuk_ios/Views/Chat/ChatMarkdownTheme.swift at fc2b3b1d
  • iOS: text.linkSecondary in govuk-once/govuk-mobile-ios-gov-kit/GovKitUI/Sources/Colors/GOVUKColors+Text.swift at 21343f5
  • Android: Markdown, its links in chatBotLinkText in govuk-once/govuk-mobile-android-app/feature/chat/src/main/kotlin/uk/gov/govuk/chat/ui/component/Markdown.kt at 9952400f
  • Figma: none linked yet