Skip to content
WingoUI
ComponentsTemplatesDocsPricingAI agentsBlogChangelogContact
Components
Buttons & Actions
ButtonButton GroupCopy ButtonDelete ButtonTheme ToggleToggleToggle Group
Inputs
Avatar UploadCalendarCheckboxColor PickerComboboxCountry SelectCron PickerCurrency InputDate PickerDate Range PickerDate Time PickerDuration PickerEmail InputEmoji PickerFile UploadFilter BuilderInputInput GroupListboxMasked InputMention InputMonth PickerMulti SelectNumber InputOTP InputPassword InputPhone InputRadio GroupRatingSearch InputSegmented ControlSelectSignature PadSliderSwitchTag InputTextareaTime PickerTimezone SelectTree Select
Forms
Address InputBooking WidgetCSV ImportFieldForm WizardInline EditInvoice line itemsRich Text EditorSchema Builder
Navigation
Back To TopBounce SidebarBreadcrumbCommand MenuGlobal SearchGooey NavHook SidebarNav MenuNav TabsPaginationProximity SidebarScroll ProgressSidebarStepsTable Of ContentsTabsTopbarUser MenuWorkspace Switcher
Overlays
Alert DialogContext MenuDialogDrawerDropdown MenuFamily DrawerHover CardPopoverShare DialogSheetShortcuts DialogTooltipTour
Feedback
AlertBannerCookie ConsentEmoji ReactionEmpty StateNotification BellNotification CenterProgressRoute ProgressSetup ChecklistSkeletonSpinnerToast
Data Display
Approval FlowAvatarBadgeCalendar ViewCode BlockComment ThreadContact cardCountdownDescription ListDiff ViewerFile ListFile managerFolderGanttJSON ViewerKbdLog ViewerMarkdownPresenceSchedulerTagTimelineTree View
Tables & Lists
Audit LogData TableDeal PipelineEditable GridKanbanListMembers tablePermissions MatrixTableTask ListVirtual List
Charts & Stats
Animated CounterArea chartBar chartDonut chartFunnel chartGaugeGitHub ActivityHeatmap calendarLeaderboardLine chartRadar chartRadial barSparklineStat CardTrackerTrend badge
Layout
AccordionApp ShellCardCollapsibleDetail LayoutEntity HeaderPage HeaderScroll AreaSeparatorSettings LayoutSplit ViewToolbar
Media
Audio PlayerCarouselCSV ViewerDOCX EditorDOCX ViewerExcel ViewerFile SystemImage compareImage CropperImage GalleryImage LightboxLocation MapPDF ViewerPowerPoint ViewerQR CodeStep PlayerVideo Player
AI Kit
Agent Status CardChat MessageChat ThreadChat WidgetConversation ListFluid OrbGrid RevealMatrix OrbModel PickerPrompt InputReasoning IndicatorRule BuilderSuggestion ChipsTool Call TimelineUsage MeterVoice InputWorkflow Canvas
Text & Effects
Background PatternGravity LettersMarqueeTerminalText AnimateText Rotate
Mobile
Action SheetBottom Tab BarFABHaptic ButtonHero HeaderInstall PromptLarge Title HeaderNotification BannerOnboarding CarouselPicker WheelPull To RefreshSlide To ConfirmSticky CTA BarSwipe DeckSwipeable Tabs
Commerce
Cart drawerCategory pickerCheckout stepsCoupon inputFavorite buttonFilter panelListing cardListing gridOrder trackerPricePrice rangePricing tableProduct galleryQuantity stepperReviewsSeller card
Marketing Sections
App Download SectionBlog Cards SectionCTA SectionFAQ SectionFeature GridFeature ShowcaseHero SectionIntegrations SectionLogo CloudMarketing FooterMarketing HeaderMarketing SectionNewsletter SectionPricing SectionStats SectionSteps SectionTeam SectionTestimonials SectionTimeline SectionVideo Section
Blocks
Admin Dashboard PageAdmin ShellAI Chat PageAPI Keys PageAutomation Builder PageCheckout PageCRM Contact PageCRM Pipeline PageError PagesInbox PageInvoice PageKPI DashboardListing Detail PageLogin PageMarketplace Home PageMarketplace Search PageMarketplace ShellMobile App HomeOnboarding FlowOrder History PagePost Listing WizardPricing PageProfile PageRegister PageSettings PageUsers Admin Page
Templates
About PageAcademy PageAccessibility PageAffiliate PageAgency PageAI Product PageAppointment Booking PageBlog PageBlog Post PageBug Bounty PageCareers PageChangelog PageCommunity PageCompare PageContact PageCustomer Story PageCustomers PageDemo Booking PageDevelopers PageDocs Home PageDownload PageEnterprise PageEvents PageExperts PageFAQ PageFeature PageGlossary PageHelp Article PageHelp Center PageHome Services PageImpact PageIntegration Detail PageIntegrations PageJob Detail PageLanding PageLaunch PageLegal PageManifesto PagePortfolio PagePress PageProduct Tour PagePromo PageReal Estate PageReferral PageResearch Report PageRestaurant PageRoadmap PageROI Calculator PageSecurity PageSolutions PageStartups PageStatus PageStorefront PageSwitch PageTemplate Gallery PageTravel PageWaitlist PageYear in Review Page
Hooks & Utilities
AI ChatChart kitCommerceDate utilsFile exportFile typesFiltersForm validationHapticsInvoicingMotion presetsNavigationNumber formatRelative timeRomanian locationsSpreadsheetText matchTonesUIProvideruseClipboarduseConsentuseControllableStateuseCooldownuseDebounceuseKeyboardInsetuseLocaleuseLongPressuseMediaControlsuseMediaQueryuseOverflowItemsusePersistedStateuseScrollEdgesuseScrollStateuseSelectionuseShortcutuseStickToBottom
GalleryTheme

AI Kit

Reasoning Indicator

AI Kit

Reasoning Indicator React component for Tailwind CSS v4

Prompt InputRule Builder
Live props
Content
content
label
showIcon
showDuration
durationMsMeasured
Appearance
variant
size
tone
color
shimmer
Layout
maxHeight320px
State
streaming
defaultOpen
Behavior
autoCollapse
peek
locale
Code
import { ReasoningIndicator } from "@/components/ui/reasoning-indicator"

<ReasoningIndicator />
  1. Home
  2. Components
  3. AI Kit
  4. Reasoning Indicator
Pro

Reasoning Indicator React component for Tailwind CSS v4

v1.0.0·Added in 1.0.0

A React reasoning indicator for AI chat: a shimmering live timer while the model thinks, then a quiet "Thought for 12 s" row to expand.

While the model thinks, the label shimmers, a timer counts up in tenths and then whole seconds, and the last two lines of the thought slide up under it. Tap or click the row or the peek (or Tab to the row and press Enter or Space) to open the full reasoning: it follows the newest thought while it streams, and scrolling up inside it lets go. When thinking ends the row settles on "Thought for 12 s" and closes again if it was open from the start; if you opened it yourself it stays open. On a phone the row keeps a 44px hit area and the open body never grows past 40% of the screen.

Reasoning Indicator is a Pro React component in the React AI components category, written in TypeScript for React 19 and Tailwind CSS v4. It installs as source with npx wingo-ui@latest add reasoning-indicator, together with Markdown, useStickToBottom, AI Chat, useControllableState, useLocale and 3 more and the npm packages motion and lucide-react.

Add to a project

Requirements: React 19 and Tailwind CSS v4, in Next.js (App Router or Pages), Vite or React Router. Installation guide · Next.js setup · Vite setup

npx wingo-ui@latest add reasoning-indicator

Reasoning Indicator is part of Pro, with 298 more Pro items: $8 a month or $150 once. 14-day refund before you download any Pro item. See plans

Usage

Import ReasoningIndicator from @/components/ui/reasoning-indicator.

import { ReasoningIndicator } from "@/components/ui/reasoning-indicator"

const labels = {
  thinking: "Working on it",
  thought: (duration: string) => `Worked for ${duration}`,
}

export function Thinking({ text, streaming, startedAt, endedAt }: { text: string; streaming: boolean; startedAt: number; endedAt?: number }) {
  return (
    <ReasoningIndicator
      content={text}
      streaming={streaming}
      startedAt={startedAt}
      endedAt={endedAt}
      labels={labels}
    />
  )
}

Props

  • contentdefault ""
    string

    The reasoning as markdown. Empty with no children: the row is plain text, with nothing to open.

  • children
    ReactNode

    Replaces the markdown body, e.g. a list of searched sites or steps.

  • labeldefault ""
    ReactNode

    Replaces the default label in any state, e.g. "Searching the web" while a phase runs, or labels.stopped(duration) for a stopped message. Leave empty for thinking / thought.

  • icondefault "<Brain />"
    ReactNode

    The 16px icon before the label (a Globe for a web search).

  • showIcondefault true
    boolean

    Shows the icon before the label.

  • showDurationdefault true
    boolean

    The live timer while thinking and the time in the done label. Off: the done label reads labels.thoughtBriefly.

  • variantdefault "ghost"
    "ghost" | "soft" | "outline"

    ghost is a flush text row for messages; soft and outline wrap the row and the body in a rounded box for standalone use.

  • sizedefault "md"
    "sm" | "md"

    The row is 28 / 32px tall with 13 / 14px text. The body is small markdown either way.

  • tonedefault "neutral"
    "neutral" | "brand" | "success" | "warning" | "danger" | "info"

    Colors the rail beside the body and the icon while thinking. Neutral uses the foreground.

  • colordefault ""
    string

    Any CSS color. Replaces the tone.

  • shimmerdefault true
    boolean

    The moving highlight on the label and the icon pulse while thinking. Off (and under reduced motion) the label stays still and muted.

  • maxHeightdefault 320
    number

    Pixels of open body before it scrolls inside. On a phone it is also capped at 40dvh. 0 lets it grow.

  • streamingdefault false
    boolean

    Thinking now: shimmer, live timer, the two-line peek and the body following new text.

  • defaultOpendefault false
    boolean

    Starts open (uncontrolled).

  • open
    boolean

    Controls the disclosure. Pair with onOpenChange.

  • onOpenChange
    (open: boolean) => void

    Called when the person toggles it or autoCollapse closes it.

  • startedAt
    Date | string | number

    When thinking began. While streaming the timer counts from here; a second phase continues from it.

  • endedAt
    Date | string | number

    When thinking ended. Before startedAt counts as 0. Without timing data the done label says labels.thoughtBriefly.

  • durationMsdefault 0
    number

    The final duration, when known; wins over startedAt / endedAt once done. Unset (Measured in the playground) uses the measured run.

  • autoCollapsedefault true
    boolean

    When thinking ends, closes again if it was open when the stream started and nobody touched it. A row the person opened stays open.

  • peekdefault true
    boolean

    Shows the last two lines of the thought under the label while it streams and the row is closed.

  • localedefault ""
    string

    Formats the duration ("12 s", "2 min. 5 s"). Empty uses UIProvider, then the browser.

  • now
    Date | number

    Pins the clock for screenshots and tests. By default a shared ticker runs only while streaming.

  • labels
    Partial<ReasoningIndicatorLabels>

    thinking "Thinking", thought (duration) => "Thought for 12 s", thoughtBriefly "Thought for a few seconds", stopped (duration) => "Stopped after 3 s", show "Show reasoning", hide "Hide reasoning" (sr-only on the trigger). Pass only the keys you translate.

  • classNames
    Partial<Record<"trigger" | "icon" | "label" | "duration" | "peek" | "content" | "body", string>>

    Extra classes for the inner parts.

  • className
    string

    Extra classes for the root, merged last.

Parts

  • DEFAULT_REASONING_INDICATOR_LABELS

    constant

    The English copy: thinking "Thinking", thought(duration) "Thought for 12 s", thoughtBriefly, stopped(duration), show "Show reasoning" and hide "Hide reasoning".

Examples

In a message

Above a streaming answer; autoCollapse folds it when the answer starts.

Named phases

"Searching the web" with a Globe, then "Reading 3 sources", then done.

Standalone box

variant soft with maxHeight 200 and a long reasoning that scrolls.

Stopped

"Stopped after 3 s" for a message the person stopped.

Sizes and tone

sm and md, the info tone, thinking and done.

Outline, brand

The default labels with a duration over two minutes.

Dependencies

motionlucide-reactmarkdownuse-stick-to-bottomai-chatuse-controllable-stateuse-localemotiontonesui-config

Files

  • components/ui/reasoning-indicator.tsx

FAQ

Is the React Reasoning Indicator component free?

The preview, props and docs are free; copying the source needs a Pro plan. See plans.

How do I install Reasoning Indicator?

Run npx wingo-ui@latest add reasoning-indicator. It also adds the Wingo UI items it builds on (Markdown, useStickToBottom, AI Chat, useControllableState, useLocale and 3 more) and the npm packages motion and lucide-react. With shadcn, add the @wingo-ui registry with your API key, then run npx shadcn@latest add @wingo-ui/reasoning-indicator.

How does Reasoning Indicator behave on phones?

On a phone the row keeps a 44px hit area and the open body never grows past 40% of the screen.

See also

AI ChatlibChat ThreadMarkdownCollapsibleuseStickToBottomhook

Used in

Chat MessageChat WidgetAI Chat Page

More React AI components

Rule BuilderSuggestion ChipsTool Call TimelineUsage MeterFluid OrbGrid Reveal
All 17 React AI components

Articles using this component

  • AI Agent Tool Call UI: Steps, Approvals and Errors

    Building UI with AI agents · Oct 16, 2026 · 11 min read

  • React AI Chat UI: Streaming, Auto-Scroll and Mobile

    Building UI with AI agents · Oct 9, 2026 · 10 min read

PreviousPrompt InputNext Rule Builder

Which invoices are overdue from September? Make me a table and suggest what to do next.

I found 3 overdue invoices from September, $22,775.95 in total:

ClientInvoiceAmountDays late
Tech Solutions LLC#2026-0405$12,480.001
Wellness Pharmacy#2026-0371$7,315.2053
Westside Books#2026-0366$2,980.7557

state: done · autoCollapse: true · peek: true · locale: en-US