- iOS:
ChatCellView.questionViewin govuk-once/govuk-mobile-ios-app/Production/govuk_ios/Views/Chat/ChatCellView.swift at fc2b3b1d - iOS:
questionWidth, backgroundColorin govuk-once/govuk-mobile-ios-app/Production/govuk_ios/ViewModels/Chat/ChatCellViewModel.swift at fc2b3b1d - iOS:
fills.surfaceChatQuestionin govuk-once/govuk-mobile-ios-app/Production/govuk_ios/Extensions/GovKit/GOVUKColors+Chat.swift at fc2b3b1d - Android:
Questionin 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
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
HTML
<govuk-app-chat-question>How do I renew my passport?</govuk-app-chat-question>
A longer question
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 |
The iOS, Android and Figma sources it was built from
Screenshots of the app's own component, to compare the examples with
iOS