Components
Spinner
Rotating loader icon for a wait of unknown length that takes the current text color.
import { Spinner } from "@openperf/deft";
<Spinner.Root />;When to use
| Need | Component |
|---|---|
| Shape of the result is unknown, or one small item is busy | Spinner |
| Known layout is loading | Skeleton |
| Busy button | loading on Button |
| Notification about a running task | Toast with type: "loading" |
Size and color
The spinner is 16px and takes the current text color. Override either with className: a size-* class for the size, a text-* class for the color.
<Spinner.Root className="size-8 text-accent" />It is announced as a localized "Loading", so it needs no label of its own.
API
Spinner.Root declares no props of its own: SpinnerProps extends the Tabler IconProps, and every prop goes to the icon.