Result
Used to feed back the results of a series of operational tasks.
When To Use
- Use when important operations need to inform the user to process the results and the feedback is more complicated.
Success Result
Show successful results.
Successfully Purchased Cloud Server ECS!
Order number: 2017182818828182881 Cloud server configuration takes 1-5 minutes, please wait.
astro
---
import Result from '@/components/feedback/Result.astro';
import Button from '@/components/general/Button.astro';
---
<Result
status="success"
title="Successfully Purchased Cloud Server ECS!"
subTitle="Order number: 2017182818828182881 Cloud server configuration takes 1-5 minutes, please wait."
>
<div slot="extra">
<Button variant="outline">Back to Orders</Button>
<Button>Buy Again</Button>
</div>
</Result> Status Variants
Different status for different situations.
Your operation has been executed
There are some problems with your operation.
Submission Failed
Please check and modify the following information before resubmitting.
astro
---
import Result from '@/components/feedback/Result.astro';
---
<Result status="info" title="Your operation has been executed" />
<Result status="warning" title="There are some problems with your operation." />
<Result status="error" title="Submission Failed" subTitle="Please check and modify the following information before resubmitting." /> HTTP Status Pages
The `status` prop supports common HTTP error codes (403, 404, 500) which render large typography instead of an icon.
404
404
Sorry, the page you visited does not exist.
astro
---
import Result from '@/components/feedback/Result.astro';
import Button from '@/components/general/Button.astro';
---
<Result status="404" title="404" subTitle="Sorry, the page you visited does not exist.">
<Button slot="extra">Back Home</Button>
</Result> API Reference
| Property | Description | Type | Default |
|---|---|---|---|
| status | Result status which determines the icon and colors (success, error, info, warning, 403, 404, 500). | 'success' | 'error' | 'info' | 'warning' | '404' | '403' | '500' | 'info' |
| title | The main title text for the result. | string | - |
| subTitle | The secondary description text. | string | - |