Status
The Status component provides a standardized way to display status indicators across the application. It ensures consistent color, iconography, and accessibility for different states such as Success, Information, Pending, Caution, and Danger.
Basic Usage
vue
<template>
<spr-status state="success" />
<spr-status state="information" />
<spr-status state="pending" />
<spr-status state="caution" />
<spr-status state="danger" />
</template>Sizes
status component has 7 different sizes. You can use the size prop to set the size of the status. The default size is base. The available sizes are 2xl, xl, lg, base, sm, xs, 2xs.
API Reference
Props
| Name | Description | Type | Default |
|---|---|---|---|
state | Defines the status state to display. Each state has a specific color and icon:
| 'success' | 'information' | 'pending' | 'caution' | 'danger' | 'success' |
size | Defines the size of the status indicator. Provides flexibility for different UI layouts and emphasis levels:
| '2xs' | 'xs' | 'sm' | 'base' | 'lg' | 'xl' | '2xl' | 'base' |
Icons
| State | Icon |
|---|---|
| Success | ph:check-circle-fill |
| Information | ph:info-fill |
| Pending | ph:warning-fill |
| Caution | ph:warning-fill |
| Danger | ph:warning-circle-fill |