dots
bars
pulse
ring
orbit
typing
Playground
Change the props and copy the code. The controls come from the component's TypeScript types.
Props
variant
size24
import { Loader } from "@/components/ui/loaders";<Loader />Installation
$ pnpm dlx shadcn@latest add @synccn/loadersFirst time in this project? Connect synccn with one command.
Usage
import { Loader } from "@/components/ui/loaders";<Loader variant="dots" />API reference
Generated from the component's TypeScript types, so it always matches the code.
Loader
Loading indicators. variant: "dots" | "bars" | "pulse" | "ring" | "orbit" | "typing"
PropTypeDescription
- variant
"dots" | "bars" | "pulse" | "ring" | "orbit" | "typing"Default
"dots"Animation style.
- size
numberDefault
24Size in pixels.
- label
stringDefault
"Loading"Accessible label.
- className
stringExtra classes for the root element.
Dependencies
Read from the component's imports when the site builds. The CLI installs all of these for you.
Helpers
- lib/utilscn (merges class names)
npm packages
- clsx for cn()
- tailwind-merge for cn()
Accessibility
- Each loader is a status region with a label (default "Loading").
From the source
Read from this component's code when the site builds, so it can't drift.
- ARIA roles: status
- ARIA attributes: aria-label
- Keys handled: Enter, Space
- Respects the reduced motion setting
- Announces changes to screen readers
More feedback
AlertInline message in five tones, with action and dismiss.ToastStacked notifications with actions, promises and hover to expand.ProgressLinear progress, determinate or indeterminate.Progress RingCircular progress with content in the middle.SkeletonShimmering placeholder while content loads.SpinnerEight-bar loading indicator.