Skip to main content

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

<govuk-app-chat-question>

Chat question

Shows a question the user asked GOV.UK Chat, in a dark blue bubble at the right of the conversation.

GOV.UK app component

Examples

A short question

How do I renew my passport? How do I renew my passport?

HTML

<govuk-app-chat-question>How do I renew my passport?</govuk-app-chat-question>

A longer question

I’m moving to Spain next year. Do I need to exchange my driving licence, and how long do I have to do it? I’m moving to Spain next year. Do I need to exchange my driving licence, and how long do I have to do it?

HTML

<govuk-app-chat-question>I’m moving to Spain next year. Do I need to exchange my driving licence, and how long do I have to do it?</govuk-app-chat-question>

Inputs

It takes no attributes.

Content

The question, as text, as the user typed it.

Outputs

None.

Rules

  • Use it in a screen of GOV.UK Chat, after the answer before it, or after the welcome message for the first question.
  • Follow it with the answer, or with a chat loading while the answer is being generated.
  • Write the question as a user would type it: in their words, not GOV.UK's.

When not to use it

When Use instead
For GOV.UK Chat's answer, or its welcome message govuk-app-chat-answer
For a question the user hasn't asked yet, suggested to them govuk-app-chat-example-questions

Sources

The iOS, Android and Figma sources it was built from
  • iOS: ChatCellView.questionView in govuk-once/govuk-mobile-ios-app/Production/govuk_ios/Views/Chat/ChatCellView.swift at fc2b3b1d
  • iOS: questionWidth, backgroundColor in govuk-once/govuk-mobile-ios-app/Production/govuk_ios/ViewModels/Chat/ChatCellViewModel.swift at fc2b3b1d
  • iOS: fills.surfaceChatQuestion in govuk-once/govuk-mobile-ios-app/Production/govuk_ios/Extensions/GovKit/GOVUKColors+Chat.swift at fc2b3b1d
  • Android: Question in govuk-once/govuk-mobile-android-app/feature/chat/src/main/kotlin/uk/gov/govuk/chat/ui/component/Question.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: A question between the welcome message and its answer, in light mode
A question between the welcome message and its answer, in light mode
iOS app: The same, in dark mode
The same, in dark mode