Components
BaseResultState
The outcome of a flow: payment done, account created, request failed.
components/ui/BaseResultState.vue
View in the demo
Example
Payment received
We sent the receipt to your email.
- Order
- #ORD-1042
- Amount
- $249.00
Payment failed
Your card was declined. Try another payment method.
Pass details to list what the user needs to keep, such as the order number or the amount, in a box under the message. The icon sits in a soft halo of its type colour and the text wraps at about 44 characters.
Centered
align="center" centres the icon, the text and the actions, for full-screen outcomes or a narrow column.
Check your email
If an account exists for [email protected], you'll get a link in a few minutes. It expires in 30 minutes.
API
Props
Name | Type | Default | Description |
|---|---|---|---|
titlerequired | string | — | The outcome. |
text | string | — | Details or the next step. |
type | AlertType | "success" | success, info, warning or error. |
icon | string | — | Replaces the icon of the type. |
title-tag | string | "h2" | The heading element. |
align | "start" | "center" | "start" | start (default) or center. |
details | BaseResultStateDetail[] | — | Rows of label and value shown in a box under the text. |
Slots
Name | Slot props | Description |
|---|---|---|
#default | — | Replaces text. |
#actions | — | Buttons under the text, in a row that wraps. |