Ballmac UI home

Thinking Loader

New

A small working pill for AI replies: an eight-ray spinner and a shimmering label that rolls through what the assistant is doing, then settles on a check. Heard once by screen readers; still with reduced motion.

v1.0.1Updated Oct 25, 2026Ships with a test
What changed
  1. 1.0.1 Oct 25, 2026A new phase fades in from a soft grey instead of from nothing, so the label never disappears between phases.
  2. 1.0.0 Oct 25, 2026First release.

Update without losing your edits

Which CRM fits a 10-person sales team best?

Working

Installation

$ pnpm dlx shadcn@latest add @ballmac/thinking-loader

Usage

import { ThinkingLoader } from "@/components/ballmac/thinking-loader"

The full example is in the Code tab above.

Examples

Finished

Answered with 6 sources

API reference

PropTypeDefault
phases

What the assistant is doing, in order. The label rolls through them. Defaults to four general phases.

string[]—
interval

How long each phase shows, in milliseconds.

number1800
done

Turns the pill into a finished state: a check and `doneLabel`.

booleanfalse
doneLabel

The text of the finished state, for example "Answered with 3 sources".

string—

Also accepts the standard attributes of its root element.

Accessibility

KeyAction
Screen readerA polite status says Working once, and the finished text when done; the rolling phases are hidden from assistive technology
Reduced motionThe spinner and the shimmer hold still; the label still changes

Use with AI

phases is string[] (what the assistant is doing, in order; defaults to four general ones), interval in ms (default 1800), done turns it into a check plus doneLabel. role=status announces Working once and the finished text when done, not each phase; the spinner and shimmer stop with reduced motion or when the theme turns loops off. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Thinking Loader (@ballmac/thinking-loader) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • The wait before and during an AI reply
  • Showing which step an agent is on without a progress bar

Not for

  • A real, measurable progress bar; use progress
  • A page or block that is loading; use skeleton or state-view

Registry JSON: https://ui.ballmac.com/r/thinking-loader.json

Credits

Free to use in personal and commercial projects.

Ballmac UI Pro

Need the whole screen, not one piece?

150 premium blocks (dashboards, settings, calendars, mail, shops, onboarding), a private shadcn registry and Figma tokens. Blocks that show data come with loading, empty and error states built in.

Not ready? Try three Pro blocks free

Leave your email and the blocks appear right here, ready to copy. Yours to use in any project.