Reasoning Text

Animated status text for showing that an AI agent is thinking and working — ASCII loader plus shimmering phrase cycles.

Cascade

Per-character spring enter/exit — variant="cascade" (default).

Loading…

Installation

CLI
npx @sonojs/ui@latest add reasoning-text
Also needsnpm i motion

Usage

reasoning-text.tsx
import { ReasoningText } from "@/components/sonojs/reasoning-text"

export function Example() {
  return (
    <ReasoningText
      variant="cascade"
      phrases={[
        "Thinking",
        "Reading the context",
        "Connecting the details",
        "Forming a response",
      ]}
    />
  )
}

Props

PropTypeDefaultDescription
phrasesstring[]Thinking / Reading…Phrases cycled while the agent works.
variant"cascade" · "swap" · "scramble""cascade"Animation when the active phrase changes.
intervalnumber1800Milliseconds each phrase remains visible.
shimmerDurationnumber2Seconds for one shimmer pass.
indicatorReactNodeascii-line LoaderOptional leading visual instead of the default loader.
classNamestring—Merge classes on the status root.