Grok Thinking
brainless/grok-thinkingFreeComponent
Grok's idle working line — a braille spinner and rotating verb in amber, as an aria-live status region.
Install it
npx shadcn@latest add https://brainless.swerdlow.dev/r/grok-thinking.jsonSource
1"use client";23import * as React from "react";4import { cn } from "@/lib/utils";56/**7 * GrokThinking — Grok's working line: a braille spinner and a rotating verb in8 * Grok's amber, with a live elapsed hint. Polite live region for screen9 * readers.10 */11const FRAMES = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"];12const VERBS = ["Thinking", "Reticulating", "Computing", "Pondering", "Percolating"];1314const FG = "#ffffff"; // 38;5;1515const MUTED = "#c0c0c0"; // 38;5;71617export function GrokThinking({18 running = true,19 verbs = VERBS,20 className,21}: {22 running?: boolean;23 verbs?: string[];24 className?: string;25}) {26 const [f, setF] = React.useState(0);27 const [v, setV] = React.useState(0);28 const [secs, setSecs] = React.useState(0);2930 React.useEffect(() => {31 if (!running) return;32 const id = setInterval(() => setF((n) => (n + 1) % FRAMES.length), 90);33 return () => clearInterval(id);34 }, [running]);3536 React.useEffect(() => {37 if (!running) return;38 const id = setInterval(() => {39 setSecs((s) => s + 1);40 if (secs % 5 === 4) setV((x) => (x + 1) % verbs.length);41 }, 1000);42 return () => clearInterval(id);43 }, [running, secs, verbs.length]);4445 if (!running) return null;4647 return (48 <div49 role="status"50 aria-live="polite"51 className={cn("flex items-center gap-2 font-mono text-[13px]", className)}52 >53 <span aria-hidden style={{ color: FG, width: "1ch" }}>54 {FRAMES[f]}55 </span>56 <span style={{ color: FG }}>{verbs[v % verbs.length]}…</span>57 <span style={{ color: MUTED }}>({secs}s)</span>58 </div>59 );60}
Files it writes
More from brainless
All 40 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Claude Diffclaude-diff | brainless | Components | Free | no deps | |
| Claude Headerclaude-header | brainless | Components | Free | no deps | |
| Claude Messageclaude-message | brainless | Components | Free | no deps | |
| Claude Permissionclaude-permission | brainless | Components | Free | no deps | |
| Claude Promptclaude-prompt | brainless | Components | Free | no deps | |
| Claude Slash Menuclaude-slash-menu | brainless | Components | Free | no deps | |
| Claude Thinkingclaude-thinking | brainless | Components | Free | no deps | |
| Claude Todo Listclaude-todo-list | brainless | Components | Free | no deps |
