Skip to content
GitHub

Bars Loader

A minimalist loading animation using vertical bars with staggered opacity transitions.

import { BarsLoader } from "@/components/ui/pxl/bars-loader";
export default function BarsLoaderDemo() {
return (
<BarsLoader
size="sm"
className="max-w-32" />
)
}
pnpm dlx shadcn@latest add pxl-ui/registry/bars-loader
import { BarsLoader } from "@/components/ui/pxl/bars-loader"
<BarsLoader />

Use the bars prop to change the bars amount of the loader.

Use the size prop to change the size of the loader.

Use the variant prop to change the colors of the loader.

import { BarsLoader } from "@/components/ui/pxl/bars-loader";
export default function BarsLoaderDemo() {
return (
<div className="flex flex-col gap-2 max-w-32 w-full">
<BarsLoader
size="sm"
variant="primary" />
<BarsLoader
size="sm"
className="max-w-32"
variant="success" />
<BarsLoader
size="sm"
className="max-w-32"
variant="danger" />
<BarsLoader
size="sm"
className="max-w-32"
variant="warning" />
<BarsLoader
size="sm"
className="max-w-32"
variant="info" />
<BarsLoader
size="sm"
className="max-w-32"
variant="muted" />
</div>
)
}
Prop Type Default Description
bars number 9 Amount of bars
size "default" | "4xs" | "3xs" | "2xs" | "xs" | "sm" | "md" | "lg" "default" Size of the bars loader
variant "default" | "primary" | "secondary" | "muted" | "success" | "warning" | "danger" "default" Colors of the bars
border "default" | "none" "default" Border of the loader