Skip to content
ComposerReasoning effortMenu

Reasoning effort

How hard the model thinks: a segmented Low, Medium, High control with a spring-driven indicator, or a compact Think toggle.

Segmented Low, Medium, High with a sliding indicator.

Installation

$ pnpm dlx shadcn@latest add https://chatcn.dev/r/reasoning-effort.json

Usage

tsx
import { ReasoningEffort, ThinkToggle } from "@/components/ui/chatcn/reasoning-effort"

<ReasoningEffort value={effort} onValueChange={setEffort} />

<ThinkToggle pressed={think} onPressedChange={setThink} />

Examples

Think toggle

The compact single toggle.

Props

PropTypeNotes
value, defaultValue, onValueChangestringDefault medium
options{ value, label, description? }[]Default Low, Medium, High. Descriptions are read after the label
size"sm" | "md"28 or 32 px
iconbooleanReasoning glyph before the segments
labelstringGroup name. Default Reasoning effort
disabledbooleanFor models without reasoning
ThinkToggleBase UI Toggle propspressed, onPressedChange, label

Keyboard

KeyAction
TabOne stop for the whole group, on the selected option
Arrow keysMove and select. Flipped in RTL
Home, EndFirst or last option

Motion

  • The indicator moves by transform on spring-snappy: critically damped, 300 ms, sampled into CSS linear(). No overshoot, no physics engine.
  • Moved with the arrow keys, it snaps: keyboard-driven UI never animates.
  • Under reduced motion it always snaps.