Launch priceOne payment

Thinking State

A shimmer, dots or a pulse beside one word, the step it is on right now, and a timer that appears after three seconds. Steps fold away behind the row, and when it finishes it stays in the thread as "Thought for 6s" with the reasoning one click away.

AI ChatFree231 lines · one file

Ready for AI tools one file typed props installs by name prompt included

Installation

How you get it

Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.

Use Layro's Thinking State for this.
Install it: npx shadcn@latest add https://layropro.com/r/thinking-state
Import it from @/components/ui/thinking-state.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.

For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above.

API

“Copy prompt” above puts a full brief on your clipboard — install command, dependencies, props, and the mistakes an assistant usually makes with this component.

Props

Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.

PropTypeNotes
labelstringOne word for what is happening. Default "Thinking".
detailstringWhat it is doing right now. Changes are crossfaded.
stepsThinkingStep[]The trail so far. With steps, the row becomes a button that unfolds them.
donebooleanFinished. Stops the motion and reads "Thought for 6s".
secondsnumberSeconds taken. Counted from mount when left out.
variant"shimmer" | "dots" | "pulse"`shimmer` sweeps the label, `dots` bounce beside it, `pulse` breathes the mark. Default `shimmer`.
defaultOpenbooleanWhether the steps start unfolded. Default false.
openboolean—
onOpenChange(open: boolean) => void—

Dependencies

npm packages

clsxframer-motionlucide-reacttailwind-merge

Layro foundations, installed alongside it

layro-theme

Lifetime access

Every component, and everything we ship next.

  • All 112 components, source included
  • The template, and everything released after you buy
  • shadcn CLI or download — React 18/19, Tailwind v4
  • One payment. No subscription.

More in AI Chat

All AI Chat components