Skip to main content

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

<govuk-app-menu-button>

Menu button

Offers a few more things the user can do with something on a card, such as a vehicle or a driving licence, without crowding the card: a round “…” button that opens a menu of them.

GOV.UK app component

Known differences from the app

  • The menu is iOS’s, approximated: a blurred panel of rows. iOS’s grows out of the button, and draws dividers between groups of items. Its items’ icons are Material Symbols, in place of SF Symbols.
  • On iOS, a menu’s items for web links say so to screen readers. Here they’re links, which screen readers announce as links.

Examples

A vehicle's menu

Tax this vehicle Book an MOT Remove vehicle Tax this vehicle Book an MOT Remove vehicle

HTML

<govuk-app-menu-button name="vehicle-menu">
  <govuk-app-menu-button-item href="https://www.gov.uk/vehicle-tax">Tax this vehicle</govuk-app-menu-button-item>
  <govuk-app-menu-button-item href="https://www.gov.uk/getting-an-mot">Book an MOT</govuk-app-menu-button-item>
  <govuk-app-menu-button-item name="remove-vehicle">Remove vehicle</govuk-app-menu-button-item>
</govuk-app-menu-button>

GOV.UK Chat's menu

Clear chat Privacy notice About Give feedback Clear chat Privacy notice About Give feedback

HTML

<govuk-app-menu-button variant="chat" name="chat-menu">
  <govuk-app-menu-button-item name="clear-chat" destructive icon="delete">Clear chat</govuk-app-menu-button-item>
  <govuk-app-menu-button-item name="privacy">Privacy notice</govuk-app-menu-button-item>
  <govuk-app-menu-button-item name="about">About</govuk-app-menu-button-item>
  <govuk-app-menu-button-item name="feedback">Give feedback</govuk-app-menu-button-item>
</govuk-app-menu-button>

Inputs

Attributes
Attribute Type Default Description
label string More options The button's name for screen readers, as the app's moreOptionsButtonAccessibilityLabel.
name string The button's name, to tell it apart when it's pressed.
variant "card" | "chat" card card: a filled circle with its dots cut out, in link blue, as on a vehicle's or a licence's card. chat: three blue dots on a white circle, as beside GOV.UK Chat's field. The chat input draws its own.

Content

Its menu's items, <govuk-app-menu-button-item> elements, top to bottom. Each is a link, with an href, or a button, with a name and value. Its label is what's written between its tags. Give it destructive to draw it in red, for one that deletes something, such as Clear chat, and icon to draw a Material Symbol at its end, such as delete.

Outputs

  • click: From the button, which opens the menu, and from an item's link or button, when it's chosen; choosing one closes the menu.

Rules

  • Use it for a few things the user can do with what's on its card, that don't need to be on show. Anything they'll want often belongs on the card itself.
  • Put it at the top right of its card, as the app does.
  • Keep its menu short, a handful of items at most, each saying what it does, such as Change address.
  • Label it for screen readers if More options doesn't say enough.

When not to use it

When Use instead
For an action the user will want often, on a card govuk-app-button variant="compact"
For an action on the whole screen, not one card govuk-app-nav-bar-item
To switch between views of the same thing govuk-app-segmented-control

Sources

The iOS, Android and Figma sources it was built from
  • iOS: menuView in govuk-once/govuk-mobile-ios-app/Production/govuk_ios/Views/DVLA/VehicleSummaryView.swift at 8f1fe5da
  • iOS: its Menu in govuk-once/govuk-mobile-ios-app/Production/govuk_ios/Views/DVLA/DrivingLicenceSummaryView.swift at 8f1fe5da
  • iOS: ChatMenuView in govuk-once/govuk-mobile-ios-app/Production/govuk_ios/Views/Chat/ChatMenuView.swift at fc2b3b1d
  • Figma: none linked yet
  • Apple Human Interface Guidelines: Pull-down buttons

In the app

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

iOS

iOS app: On a vehicle's card, beside its number plate, in light mode
On a vehicle's card, beside its number plate, in light mode
iOS app: The same, in dark mode
The same, in dark mode