AIComponentBeta

Reasoning.

Watch it think, then tuck it away.

The model's visible thinking. It opens while thinking streams so the reader can follow, then closes once to a single line: Thought for N seconds. A reader who toggled it keeps their choice.

Make it yours

Preparing the example…

PROPERTIES1

Composition

Anatomy

Duration is measured from the streaming prop unless you pass it. Control open yourself to turn off the automatic behavior.

Component structure
Reasoning.Root (streaming, autoClose, duration) — Collapsible.Root
├── Reasoning.Trigger — Shimmer “Thinking…” → “Thought for N seconds”
└── Reasoning.Content — Collapsible.Panel, usually a Response

A place to start

Usage

Import the stylesheet once at your application root. This complete example reflects the properties selected above.

Loading example…

Details that make a difference

Examples & states

The finer details

API reference

Generated from Dixy’s local TypeScript interfaces. Native and Base UI Collapsible props are forwarded; this table covers the options Dixy adds.

ReasoningRoot

PropType / descriptionDefault
streamingboolean

The model is still thinking. Opens the panel so the reader can follow, then closes it once when thinking ends.

false
openboolean

Controlled open state. Stops the automatic open and close.

—
defaultOpenboolean

Initial open state when uncontrolled.

false
onOpenChange((open: boolean) => void)

Called when the reader opens or closes it.

—
durationnumber

Thinking time in seconds. Measured from `streaming` when omitted.

—
autoCloseboolean

Close automatically when thinking ends. A reader who toggled the panel keeps their choice.

true

ReasoningTrigger

PropType / descriptionDefault
childrenReactNode | ((state: { streaming: boolean; duration?: number; }) => ReactNode)

Replace the label. Receives the state the default label uses.

—
thinkingLabelstring

Label while thinking.

Thinking…
formatDuration((seconds: number) => string)

Label once done.

"Thought for N seconds"
Explore the full Base UI API

Built from the same foundations

Styling tokens

Change Theme settings above to compare appearance, accent, neutral, radius, spacing density, motion and direction. Override component aliases on a Theme root so custom properties follow portaled content too. The wrapper merges className, style, refs and render composition with its owning primitive.

TokenPurpose
--dixy-disclosure-motion-revealThe component-specific starting point.
--dixy-font-label-mdControl label font and line height; body roles remain readable in text inputs.
--dixy-color-background-selectedSelected surfaces use semantic color across appearances.
--dixy-color-border-focusFocus indication remains visible independently of shadows.
--dixy-spacing-inset-smDensity-aware component padding.
--dixy-motion-transition-feedbackShort state feedback, reduced by the inherited motion setting.
Explore theme customization

Consider everyone

Accessibility

The trigger is a real button with aria-expanded and aria-controls from Base UI Collapsible. The shimmer is visual only; the label is read normally, and reduced motion makes it static.

Enter / SpaceOpen or close the reasoning.

Target: WCAG 2.2 AA. Automated tests cover selected behavior; manual screen-reader, contrast, and zoom validation remain part of the release checklist.

THE THINKING BEHIND IT

Build it. Then understand it.

Automatic behavior must yield to the person. One ref remembers that the reader touched the disclosure, and the auto-close never overrides them.

A token to follow--dixy-disclosure-motion-reveal

Nothing up our sleeves

Source
UP NEXTTool