StatusBadge playground
An inline status label paired with one of five distinct monochrome glyphs.
Preview
Build status
Props editor
State matrix
| Variant | Default |
|---|---|
| success | Build status |
| warning | Build status |
| danger | Build status |
| info | Build status |
| neutral | Build status |
Published example
API referenceimport { StatusBadge, type Status } from '@ancrel/ui'
import '@ancrel/tokens/css'
import '@ancrel/ui/styles.css'
const checks: { name: string; status: Status; label: string }[] = [
{ name: 'Spelling', status: 'success', label: 'Passed' },
{ name: 'Images', status: 'warning', label: 'Needs review' },
{ name: 'Links', status: 'danger', label: 'Failed' },
{ name: 'Index', status: 'info', label: 'In progress' },
{ name: 'Preview', status: 'neutral', label: 'Waiting' },
]
export default function App() {
return (
<ul aria-label="Publication checks">
{checks.map(check => (
<li key={check.name}>{check.name}{' '}<StatusBadge status={check.status} label={check.label} /></li>
))}
</ul>
)
}