Loading preview
Bar Loader
LoadersA thin indeterminate progress bar for pages and cards that are loading.
A circular loading indicator in three sizes that inherits the text color.
npx shadcn@latest add @venusui/spinnerRun this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.
Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.
@/components/ui/spinner.tsxThe code behind the preview above.
spinner-demo.tsx
import { Spinner } from "@/components/ui/spinner"
export default function SpinnerDemo() {
return (
<div className="flex items-center gap-6">
<Spinner size="sm" />
<Spinner />
<Spinner size="lg" className="text-muted-foreground" />
<button type="button" disabled className="inline-flex h-9 items-center gap-2 rounded-lg bg-primary px-4 text-sm font-medium text-primary-foreground opacity-80">
<Spinner size="sm" label="Saving" />
Saving
</button>
</div>
)
}
| Prop | Type | Default | Description |
|---|---|---|---|
| size | "sm" | "md" | "lg" | "md" | 16, 24 or 32 pixels. |
| label | string | "Loading" | Text announced to screen readers. |
All <span> props except children.
cn helper at @/lib/utils. Works in Server Components.className="text-muted-foreground".size="sm" and a specific label such as "Saving".role="status", so the label is announced when the spinner appears.label prop instead.Unknown registry "@venusui"npx shadcn@latest), install by URL, or register it with its address: npx shadcn@latest registry add @venusui=https://venusui.com/r/{name}.json.No components.json foundnpx shadcn@latest init in your project first.A thin indeterminate progress bar for pages and cards that are loading.
Three dots that rise and fall in turn, for typing or inline loading states.
Circular progress with the value in the middle, exposed as an accessible progress bar.