Skip to component
GGamma

Thought line

A reasoning trace header with a live clock and a shimmer, folding its steps into one line when the work settles.

New
Reading the source map
Matching the pattern to the catalogue
Measuring the computed styles
Writing the independent brief
Thinking…, in progress

The label shimmers while the trace runs, then folds its steps into one line.

Live previewUse keyboard to interact

Implementation

1"use client";2 3import {4  useEffect,5  useRef,6  useState,7  type CSSProperties,8  type ReactNode,9} from "react";10 11import { useReducedMotion } from "@/lib/media";12 13export type ThoughtLineGlyph = "sparkle" | "dot" | "none" | ReactNode;14 15export interface ThoughtLineProps {16  label?: string;17  doneLabel?: string;18  renderLabel?: (text: string, working: boolean) => ReactNode;19  glyph?: ThoughtLineGlyph;20  steps?: string[];21  collapsible?: boolean;22  collapseOnSettle?: boolean;23  color?: string;24  glyphColor?: string;25  fontSize?: number;26  breathPeriod?: number;27  breathDepth?: number;28  shimmer?: boolean;