A small ring in the text color for one busy part of a page. It appears after 400ms, so a quick load shows nothing. For a button use Button loading; for known progress, Progress.
A Markdown brief for Claude, Cursor or v0: install, setup, props and a complete example.
For one busy part of a page when nothing better fits. It waits 400ms before showing, so a quick load shows nothing.
A button that’s working? Button loading. Progress you can measure? Progress.
Says its label politely once, when it appears; the ring itself is hidden from screen readers. Leave the label out only when words beside it, or aria-busy on the region, already say what’s loading. Under Reduce Motion it breathes instead of turning.
import { Spinner } from '@idyeah/diya'Stable since 1.2.0
labelstringWhat's loading, such as "Loading older invoices"; said politely once, when the spinner appears. Leave it out only when words beside it, or aria-busy on the region, already say so.
showLabelbooleanShows label beside the ring, at the same moment (the one copy screen readers hear); defaults to false.
Default false
size"small" | "medium" | "large"16, 20 or 24px: small beside caption and body text, medium beside large text, large beside titles or alone in a panel. Defaults to 'medium'.
Default 'medium'
Also takes every native <span> attribute, such as id, aria-* or data-*.