BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/fluid-functionalism/thinking-indicator

Thinking Indicator

fluid-functionalism/thinking-indicator
FreeComponent

Animated loading indicator with morphing SVG path (circle to infinity loop) and shimmer text rotation. Cycles through customizable status words.

Install it

npx shadcn@latest add https://fluidfunctionalism.com/r/thinking-indicator.json

Source

registry/default/thinking-indicator.tsxfluidfunctionalism.com/r/thinking-indicator.json
1"use client";
2
3import { forwardRef, useState, useEffect, type HTMLAttributes } from "react";
4import { motion, AnimatePresence, useReducedMotion } from "framer-motion";
5import { cn } from "@/lib/utils";
6import { fontWeights } from "@/lib/font-weight";
7
8const circleA =
9 "M 12 8 C 14.21 8 16 9.79 16 12 C 16 14.21 14.21 16 12 16 C 9.79 16 8 14.21 8 12 C 8 9.79 9.79 8 12 8 Z";
10
11const infinity =
12 "M 12 12 C 14 8.5 19 8.5 19 12 C 19 15.5 14 15.5 12 12 C 10 8.5 5 8.5 5 12 C 5 15.5 10 15.5 12 12 Z";
13
14const circleB =
15 "M 12 16 C 14.21 16 16 14.21 16 12 C 16 9.79 14.21 8 12 8 C 9.79 8 8 9.79 8 12 C 8 14.21 9.79 16 12 16 Z";
16
17const words = ["Thinking", "Moonwalking", "Planning", "Refining"];
18
19interface ThinkingIndicatorProps extends HTMLAttributes<HTMLDivElement> {
20 /** Show the morphing circle⇄infinity glyph before the label. Set to `false`
21 * for a text-only indicator (e.g. inline before a streamed reply). */
22 showIcon?: boolean;
23}
24
25const ThinkingIndicator = forwardRef<HTMLDivElement, ThinkingIndicatorProps>(
26 ({ className, showIcon = true, ...props }, ref) => {
27 const [index, setIndex] = useState(0);
28 // Reduced motion drops the infinite glyph morph and the word cycling — a
29 // static glyph and label carry the same meaning without the movement.
30 const reduceMotion = useReducedMotion() ?? false;
31
32 useEffect(() => {
33 if (reduceMotion) return;
34 const interval = setInterval(() => {
35 setIndex((i) => (i + 1) % words.length);
36 }, 4000);
37 return () => clearInterval(interval);
38 }, [reduceMotion]);
39
40 return (
41 <div
42 ref={ref}
43 role="status"
44 className={cn("flex items-center gap-2 px-3 py-2", className)}
45 {...props}
46 >
47 {/* Static announcement — the cycling word display below is aria-hidden
48 so screen readers hear one "Thinking…" instead of a re-announcement
49 every 4 seconds. */}
50 <span className="sr-only">Thinking…</span>
51 {showIcon && (
52 <motion.svg
53 aria-hidden
54 width={20}
55 height={20}
56 viewBox="0 0 24 24"
57 fill="none"
58 stroke="currentColor"
59 strokeWidth={1.5}
60 strokeLinecap="round"
61 strokeLinejoin="round"
62 className="text-muted-foreground shrink-0"
63 >
64 {reduceMotion ? (
65 <path d={infinity} />
66 ) : (
67 <motion.path
68 animate={{
69 d: [circleA, infinity, circleB, infinity, circleA],
70 }}
71// … truncated

What it pulls in

npm packages

  • framer-motion

Other registry items

  • utils
  • https://www.fluidfunctionalism.com/r/font-weight.json

Files it writes

  • registry/default/thinking-indicator.tsx

Facts

Registry
fluid-functionalism
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-02
Last confirmed
today

Go to the source

fluidfunctionalism.com mickadesign/fluid-functionalism on GitHub Raw registry item This item as JSON

More from fluid-functionalism

All 53 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Accordionaccordionfluid-functionalismComponentsFree3 deps
Accordion (Base UI)accordion-basefluid-functionalismComponentsFree3 deps
Ask User Questionsask-user-questionsfluid-functionalismComponentsFree2 deps
Badgebadgefluid-functionalismComponentsFree1 dep
Buttonbuttonfluid-functionalismComponentsFree4 deps
Button (Base UI)button-basefluid-functionalismComponentsFree4 deps
Cardcardfluid-functionalismComponentsFree1 dep
Chat Messagechat-messagefluid-functionalismComponentsFree1 dep
BlockDex

Built by

Kynth Studio

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

BlockDex

BlockDex

Built by

Kynth Studio

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

BlockDex

BlockDex

Built by

Kynth Studio

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

BlockDex