Skeleton, Progress
FrondUsage
The import, then a use to start from. Both copy as they are.
Import
import { Progress } from "@/components/ui/progress";import { Skeleton } from "@/components/ui/skeleton";Example
{isLoading ? ( <div className="flex flex-col gap-2" aria-busy> <Skeleton className="h-4 w-48" /> <Skeleton className="h-4 w-32" /> </div>) : ( <SiteList sites={sites} />)} <Progress value={62} label="Publishing" />When to use
Use it for
Skeletonwhile data loads, in the shape and size of what's coming, so nothing jumps when it lands.Progressonly when the work has a known length;toneisprimary,success,info,warningordanger.- Use
warningfor a quota running low anddangerwhen it is used up. - Show data as soon as part of it is there, and keep the skeleton on the rest.
Avoid
- A spinner or “Loading…” text where a skeleton fits.
- A progress bar that guesses. Open-ended work gets a present-tense line instead: “Publishing docs.acme.dev…”.
Accessibility
Checks
- Give
Progressalabel, so its value is read with a name. - Mark the loading region
aria-busyuntil the data lands.
API
Read from each component's stories, the same source as COMPONENTS.md, and kept in step by check:design-system.
Skeleton
Its stories don't declare
argTypes, so no props are listed. The variants show its states.VariantsDefaultCircleCardTextLines
Progress
| Prop | Values |
|---|---|
| value | range |
| tone | "primary""success""info""warning""danger" |
VariantsDefaultSuccessInfoWarningDangerEmptyComplete