Skip to main content

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

<govuk-app-chat-example-questions>

Chat example questions

Suggests questions to ask GOV.UK Chat, at the start of a new chat, under the welcome message. Pressing one asks it.

GOV.UK app component

Examples

Three questions

How do I renew my passport? What benefits can I get if I’m caring for someone? When is my council tax due? How do I renew my passport? What benefits can I get if I’m caring for someone? When is my council tax due?

HTML

<govuk-app-chat-example-questions>
  <govuk-app-chat-example-question href="#">How do I renew my passport?</govuk-app-chat-example-question>
  <govuk-app-chat-example-question href="#">What benefits can I get if I’m caring for someone?</govuk-app-chat-example-question>
  <govuk-app-chat-example-question href="#">When is my council tax due?</govuk-app-chat-example-question>
</govuk-app-chat-example-questions>

Inputs

It takes no attributes.

Content

A <govuk-app-chat-example-question> for each question, holding its text. Give one an href to go to a page, such as the answer, or a name and value to be a button.

Outputs

  • click: From a question's link or button, when it's pressed.

Rules

  • Show them only in a new chat, after the welcome message, as the app does. Leave them out once the user has asked a question.
  • Suggest two or three questions, as the app does.
  • Write each as a user would ask it, about something GOV.UK Chat can answer.

When not to use it

When Use instead
For things to do with the chat, such as clearing it govuk-app-menu-button-item
For a question the user has asked govuk-app-chat-question
For suggestions outside GOV.UK Chat, such as other screens to go to govuk-app-grouped-list-row type="navigation"

Sources

The iOS, Android and Figma sources it was built from
  • iOS: ChatExampleQuestionsView in govuk-once/govuk-mobile-ios-app/Production/govuk_ios/Views/Chat/ChatExampleQuestionsView.swift at fc2b3b1d
  • iOS: fills.surfaceCardDefault in govuk-once/govuk-mobile-ios-gov-kit/GovKitUI/Sources/Colors/GOVUKColors+Fills.swift at 21343f5
  • Android: IntroMessages, its example questions in govuk-once/govuk-mobile-android-app/feature/chat/src/main/kotlin/uk/gov/govuk/chat/ui/component/IntroMessages.kt at 9952400f
  • Figma: none linked yet

In the app

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

iOS

iOS app: Three questions under the welcome message, in light mode
Three questions under the welcome message, in light mode
iOS app: The same, in dark mode
The same, in dark mode