Skip to content
VenusUI
Get started

Dots Loader

Three dots that rise and fall in turn, for typing or inline loading states.

Preview

Installation

npx shadcn@latest add @venusui/dots-loader

Run this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.

Files added to your project

Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.

  • @/components/ui/dots-loader.tsx

Usage

The code behind the preview above.

dots-loader-demo.tsx

import { DotsLoader } from "@/components/ui/dots-loader"

export default function DotsLoaderDemo() {
  return (
    <div className="flex flex-col items-center gap-6">
      <DotsLoader className="text-2xl" />
      <div className="inline-flex items-center gap-2 rounded-full border bg-card px-4 py-2 text-sm text-muted-foreground">
        Assistant is typing
        <DotsLoader label="Assistant is typing" />
      </div>
    </div>
  )
}

API reference

PropTypeDefaultDescription
labelstring"Loading"Text announced to screen readers.

All <span> props except children.

Requirements

  • Tailwind CSS v4. The CLI adds the dots-loader keyframes and --animate-dots-loader to your CSS.
  • A cn helper at @/lib/utils. Works in Server Components.

Customization

  • Dots scale with the font size, so className="text-2xl" makes them bigger.
  • They use the text color; set it with a text class.

Accessibility

  • Has role="status" and announces label.
  • With reduced motion, the dots fade gently instead of moving.

Troubleshooting

Dots don’t move.
Check that the dots-loader keyframes and --animate-dots-loader are in your CSS.
Unknown registry "@venusui"
Your shadcn CLI couldn’t find the namespace in the shadcn registry index. Use the latest CLI (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 found
Run npx shadcn@latest init in your project first.
Loading preview

Bar Loader

Loaders

A thin indeterminate progress bar for pages and cards that are loading.

Loading preview

A CSS-only cube with six content faces that tumbles slowly and pauses on hover.

Loading preview

A tilted wall of vertically scrolling columns, for screenshots and showcases.