Default
Show the codeHide the code
Default, code
<FieldStatus status="success">That username is available</FieldStatus>A status line under a field, beside FieldError: success, checking (with a spinner) or a warning, each with its own glyph, colour and hidden prefix, never colour alone.
Still previews of the real component, rendered from its stories. Pro code isn’t public, so nothing in them responds. Switch the theme and density for every preview at once.
Default, code
<FieldStatus status="success">That username is available</FieldStatus>Statuses, code
<div className="flex flex-col gap-stack-sm">
<FieldStatus status="success">That username is available</FieldStatus>
<FieldStatus status="checking">Checking that username</FieldStatus>
<FieldStatus status="warning">Similar to a name already in use</FieldStatus>
</div>With a field, code
<div className="flex flex-col gap-stack-xs">
<TextField label="Username" defaultValue="priya.shah" size="lg" aria-describedby="username-status" />
<FieldStatus status="success" id="username-status">That username is available</FieldStatus>
</div>The 7 design tokens FieldStatus reads, with the value each has in the theme and density chosen above. Change a token and the component follows, in Figma and in code.
| Token | Value now | CSS variable |
|---|---|---|
| color.icon.default | … | --sd-color-icon-default |
| color.icon.success | … | --sd-color-icon-success |
| color.icon.warning | … | --sd-color-icon-warning |
| color.text.secondary | … | --sd-color-text-secondary |
| color.text.success | … | --sd-color-text-success |
| color.text.warning | … | --sd-color-text-warning |
| spacing.gap.sm | … | --sd-spacing-gap-sm |
Pro components come as source from the SuperDuper registry, with a licence key from Solo, Team or Studio. The registry and checkout aren’t open yet.
Add it from the registry (Pro licence key)
npx shadcn@latest add @superduperui/field-statusThen import it
import { FieldStatus } from "@/components/ui/field-status"| Prop | Type | What it does |
|---|---|---|
statusrequired | 'success' | 'checking' | 'warning' | success (a tick), checking (a spinner) or warning (a triangle). Errors are FieldError, not a status. |
childrenrequired | ReactNode | The message, short and specific ("That username is available"). |
id | string | Put this id in the field's aria-describedby so the status is read with the field. |
className | string |
Screen readers announce "Success: That username is available" (announced politely when it changes).
WCAG 2.2 AAA criteria the component meets in Comfortable density: 1.4.6, 1.4.9, 2.3.2, 2.3.3.
Not interactive: density changes spacing only.
| axe-core (WCAG A, AA, AAA and best practice) | 80 runs across every story, theme, density and width: 0 violations |
|---|---|
| Rendered text contrast | 130 text runs: 0 below 7:1, lowest 8.42:1 |
| Target size | 2 targets: 0 under 44px in Comfortable |
| Focus appearance (2.4.13) | 0 focus stops in 0 browser engines: all pass |
Manual passes with VoiceOver and NVDA haven’t been done yet.
The Figma component is FieldStatus, with Status (Success, Checking, Warning). The Figma library isn’t published yet.
Figma to code: Status → status (Success = "success", Checking = "checking", Warning = "warning"); Message → children.