{"@context":"https://schema.org","@graph":[{"@type":"TechArticle","headline":"Loader","description":"A lightweight and visually appealing loading indicator that enhances user experience by signaling ongoing background processes and providing visual feedback.","url":"https://intentui.com/docs/components/statuses/loader","author":{"@type":"Person","name":"Irsyad","url":"https://x.com/irsyad"},"publisher":{"@type":"Organization","name":"Intent UI","url":"https://intentui.com","logo":{"@type":"ImageObject","url":"https://intentui.com/icon.svg"}},"mainEntityOfPage":{"@type":"WebPage","@id":"https://intentui.com/docs/components/statuses/loader"}},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://intentui.com"},{"@type":"ListItem","position":2,"name":"Docs","item":"https://intentui.com/docs"},{"@type":"ListItem","position":3,"name":"Components","item":"https://intentui.com/docs/components"},{"@type":"ListItem","position":4,"name":"Statuses","item":"https://intentui.com/docs/components/statuses"},{"@type":"ListItem","position":5,"name":"Loader","item":"https://intentui.com/docs/components/statuses/loader"}]}]}
Statuses
Loader
A lightweight and visually appealing loading indicator that enhances user experience by signaling ongoing background processes and providing visual feedback.
Loading...
Installation
Install the component via the CLI in one command.
npm
pnpm
yarn
bun
npx shadcn@latest add @intentui/loader
Manual installation
Use this approach if you prefer to install and wire up the component yourself instead of using the CLI.
npm
pnpm
yarn
bun
npm install @heroicons/react tailwind-merge
Anatomy
import { Loader } from "@/components/ui/loader"<>
<Loader variant="ring" />
<Loader variant="spin" />
<Loader variant="bars" />
</>Examples
Variants
There are four different variants of the loader. The default variant is the ring-3.
Loading...
Size
The loader defaults to a small size, but you can also select medium, large, or extra-large.
Loading...
Component API
The Loader component displays loading feedback.
| Prop | Type | Default |
|---|---|---|
formatOptions | Intl.NumberFormatOptions | - |
isIndeterminate | boolean | true |
percentage | number | - |
variant | keyof typeof LOADERS | - |
Intent UI Design
Build modern web apps faster with 1000+ resources across components, blocks, patterns, templates, and starter kits.