BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/SmoothUI Registry/ai-loader

Ai Loader

smoothui-registry/ai-loader
FreeComponent

Family of AI waiting indicators — dots, sweep bar and pixel grid — sharing one cycle length, with an optional elapsed counter.

Install it

npx shadcn@latest add https://www.smoothui.dev/r/ai-loader.json

Source

index.tsxwww.smoothui.dev/r/ai-loader.json
1"use client";
2
3import { cn } from "@/lib/utils";
4import { motion, useAnimationFrame, useReducedMotion } from "motion/react";
5import { useRef, useState } from "react";
6
7/**
8 * One cycle length for every variant.
9 *
10 * Two loaders on the same screen running at different tempos read as two
11 * unrelated things loading. Sharing the cycle makes them feel like one system
12 * working, which is the whole point of a loader family.
13 */
14export const AI_LOADER_CYCLE_SECONDS = 1.2;
15
16const DOT_COUNT = 3;
17const GRID_SIZE = 3;
18const GRID_CELLS = GRID_SIZE * GRID_SIZE;
19/** Diagonal wave order, so the grid fills like a sweep rather than at random. */
20const GRID_DELAYS = [0, 1, 2, 1, 2, 3, 2, 3, 4];
21const EASE_IN_OUT = [0.645, 0.045, 0.355, 1] as const;
22const MS_PER_SECOND = 1000;
23const ELAPSED_DECIMALS = 1;
24
25export type AILoaderVariant = "dots" | "bar" | "grid";
26
27export type AILoaderProps = {
28 className?: string;
29 /** Optional text before the indicator, e.g. "Thinking". */
30 label?: string;
31 /** Appends a live elapsed counter. Long waits need a sign of progress. */
32 showElapsed?: boolean;
33 variant?: AILoaderVariant;
34};
35
36const Dots = ({ reduced }: { reduced: boolean }) => (
37 <span className="flex items-center gap-1">
38 {Array.from({ length: DOT_COUNT }, (_, index) => (
39 <motion.span
40 animate={reduced ? { opacity: 0.5 } : { opacity: [0.25, 1, 0.25] }}
41 className="size-1.5 rounded-full bg-current"
42 // biome-ignore lint/suspicious/noArrayIndexKey: dots are positional
43 key={index}
44 transition={
45 reduced
46 ? { duration: 0 }
47 : {
48 delay: (index * AI_LOADER_CYCLE_SECONDS) / (DOT_COUNT * 2),
49 duration: AI_LOADER_CYCLE_SECONDS,
50 ease: EASE_IN_OUT,
51 repeat: Number.POSITIVE_INFINITY,
52 }
53 }
54 />
55 ))}
56 </span>
57);
58
59const Bar = ({ reduced }: { reduced: boolean }) => (
60 <span className="relative block h-1 w-24 overflow-hidden rounded-full bg-current/15">
61 {/* A sweep, not a percentage. Faking determinate progress for an unknown
62 wait is the one thing a loader must never do. */}
63 <motion.span
64 animate={reduced ? { x: "0%" } : { x: ["-100%", "200%"] }}
65 className="absolute inset-y-0 w-1/3 rounded-full bg-current"
66 transition={
67 reduced
68 ? { duration: 0 }
69 : {
70 duration: AI_LOADER_CYCLE_SECONDS * 1.4,
71 ease: EASE_IN_OUT,
72// … truncated

What it pulls in

npm packages

  • motion

Files it writes

  • index.tsx

Facts

Registry
SmoothUI Registry
Type
registry:ui
Access
Free
Files written
1
Licence
the repository states none
In the index
at or before 2026-08-12
Last confirmed
yesterday

Go to the source

www.smoothui.dev educlopez/smoothui on GitHub Raw registry item This item as JSON

More from SmoothUI Registry

All 178 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Agent Avataragent-avatarSmoothUI RegistryComponentsFreeno deps
Ai Approvalai-approvalSmoothUI RegistryComponentsFree2 deps
Ai Artifactai-artifactSmoothUI RegistryComponentsFree2 deps
Ai Branchai-branchSmoothUI RegistryComponentsFree2 deps
Ai Citationai-citationSmoothUI RegistryComponentsFree2 deps
Ai Context Meterai-context-meterSmoothUI RegistryComponentsFree2 deps
Ai Conversationai-conversationSmoothUI RegistryComponentsFree2 deps
Ai Coreai-coreSmoothUI RegistryComponentsFree1 dep

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex