---
title: "Reasoning Text"
description: "Free React AI reasoning text: shimmering copy with an ASCII loader and cascade, phrase swap or letter scramble transitions between steps. shadcn install."
category: "AI Agents"
parent: "https://beui.dev/components/agents/loading-states"
publishedAt: "2026-07-30"
updatedAt: "2026-11-25"
documentation: "https://beui.dev/components/agents/loading-states/reasoning-text"
markdown: "https://beui.dev/components/agents/loading-states/reasoning-text.md"
license: "MIT"
---

# Reasoning Text

> Free React AI reasoning text: shimmering copy with an ASCII loader and cascade, phrase swap or letter scramble transitions between steps. shadcn install.

## Install

```bash
npx shadcn@latest add @beui/reasoning-text
```

## Dependencies

- `clsx`
- `motion`
- `react`
- `tailwind-merge`

## Usage

### Reasoning Text usage

Shimmering reasoning copy with an ASCII loader and cascade, phrase-swap, or per-letter scramble transitions.

```tsx
"use client";

import {
  ReasoningText,
  type ReasoningTextVariant,
} from "@/components/agents/loading-states/reasoning-text";

const EXAMPLES: {
  label: string;
  variant: ReasoningTextVariant;
  phrases: string[];
}[] = [
  {
    label: "Cascade",
    variant: "cascade",
    phrases: [
      "Thinking",
      "Reading the request",
      "Working through the details",
      "Preparing the answer",
    ],
  },
  {
    label: "Swap",
    variant: "swap",
    phrases: [
      "Thinking",
      "Reading the request",
      "Working through the details",
      "Preparing the answer",
    ],
  },
  {
    label: "Scramble",
    variant: "scramble",
    phrases: ["Thinking", "Searching", "Reasoning", "Composing"],
  },
];

export function ReasoningTextPreview() {
  return (
    <div className="grid w-full max-w-sm gap-7">
      {EXAMPLES.map(({ label, variant, phrases }) => (
        <div key={variant} className="grid gap-2">
          <span className="text-[11px] font-medium uppercase tracking-wider text-muted-foreground/60">
            {label}
          </span>
          <ReasoningText
            variant={variant}
            phrases={phrases}
            className="text-base"
          />
        </div>
      ))}
    </div>
  );
}
```

## API Reference

### ReasoningText

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `phrases` | `string[]` | — | No | Phrases cycled through while the agent works. |
| `variant` | `"cascade" \| "scramble" \| "swap"` | `cascade` | No | Animation used when the active phrase changes. |
| `interval` | `number` | `1800` | No | Milliseconds each phrase remains visible. |
| `shimmerDuration` | `number` | `2.2` | No | Seconds taken for one shimmer pass. |
| `indicator` | `ReactNode` | — | No | Optional leading visual. Defaults to a terminal-style ASCII loader. |
| `labels` | `Partial<{ thinking: string; churning: string; inProgress: string; reasoning: string; phraseThinking: string; phraseReading: string; phraseConnecting: string; phraseForming: string; }>` | — | No | Override any built-in string, including the default phrases. |
| `className` | `string` | — | No | Classes merged onto the root element. |

## More in Agent Loading States

- [Thinking Shimmer](https://beui.dev/components/agents/loading-states/thinking-shimmer.md)
- [Agent Progress](https://beui.dev/components/agents/loading-states/agent-progress.md)

## Source

- Registry detail: https://beui.dev/r/reasoning-text
- Raw source: https://beui.dev/r/reasoning-text/raw
- GitHub: https://github.com/starc007/ui-components
