Uai

aithinking.tsx

Color theme

component · 01/108

Thinking

A live and inspectable activity disclosure with explicit states and structured evidence.

Install

Install manuallyView source on GitHub

Anatomy

  • Thinking
  • ThinkingTrigger
  • ThinkingContent
  • ThinkingActivity

Accessibility7 checks

  • The trigger exposes expanded and collapsed state.
  • The trigger references the disclosed content.
  • New activity is announced through a polite live log.
  • Activity entries keep their ordered-list semantics.
  • Status is communicated with text instead of color alone.
  • Decorative state icons stay hidden from assistive technology.
  • Card, inline, and compact keep the same disclosure, states, and live regions.
canvasvariant="card"ai
Response panel
  1. Found the component contractSearchThinking component accessibility0.3s
  2. Read the public interfaceFilesrc/registry/uai/components/thinking.tsx0.8s
  3. Checked the registry outputToolbun run registry:build
Thinking variant

Code example

usage.tsx
"use client";import { useState } from "react";import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group";import {  Thinking,  ThinkingActivity,  ThinkingContent,  type ThinkingStatus,  ThinkingTrigger,  type ThinkingVariant,} from "@/components/ui/uai/thinking";const copy: Record<ThinkingStatus, { summary: string; duration: string }> = {  thinking: { summary: "Checking the component interface and useful states.", duration: "1.8s" },  complete: { summary: "The component contract is ready to review.", duration: "3.4s" },  error: { summary: "The registry build stopped before validation.", duration: "2.6s" },};export function ThinkingPreview({ variant = "card" }: { variant?: ThinkingVariant }) {  const [status, setStatus] = useState<ThinkingStatus>("thinking");  return (    <div className="grid w-full gap-3">      <ToggleGroup        type="single"        aria-label="Thinking status"        value={status}        onValueChange={(next) => next && setStatus(next as ThinkingStatus)}        className="justify-self-center"      >        <ToggleGroupItem value="thinking">Live</ToggleGroupItem>        <ToggleGroupItem value="complete">Complete</ToggleGroupItem>        <ToggleGroupItem value="error">Error</ToggleGroupItem>      </ToggleGroup>      <Thinking variant={variant} status={status}>        <ThinkingTrigger summary={copy[status].summary} duration={copy[status].duration} />        <ThinkingContent>          <ThinkingActivity type="search" query="Thinking component accessibility" elapsed="0.3s">            Found the component contract          </ThinkingActivity>          <ThinkingActivity            type="file"            path="src/registry/uai/components/thinking.tsx"            elapsed="0.8s"          >            Read the public interface          </ThinkingActivity>          <ThinkingActivity            type="tool"            tool="bun run registry:build"            elapsed={status === "thinking" ? undefined : status === "complete" ? "3.4s" : "2.6s"}          >            {status === "error" ? "Registry build failed" : "Checked the registry output"}          </ThinkingActivity>        </ThinkingContent>      </Thinking>    </div>  );}

Manual installation

thinking.tsx

Loading component source…

esc
ThinkingAI
MessageAI
CitationAI
AttachmentAI
Tool CallAI
Response StatusAI
Run SummaryAI
Conversation ThreadAI · Block
Research SessionAI · Block
File AnalysisAI · Block
Agent RunAI · Block
Approval CardFeedback
Empty StateFeedback
Status BannerFeedback
Progress SummaryFeedback
Inline FeedbackFeedback
Confirmation DialogFeedback
Activity TimelineFeedback
Skeleton GroupFeedback
Prompt ComposerForms
Form FieldForms
Search FieldForms
Filter BarForms
File UploadForms
Date Range PickerForms
Form Error SummaryForms
Unsaved Changes BarForms
Step IndicatorForms
Task ListData Display
Data Table ToolbarData Display
Metric CardData Display
Description ListData Display
Comparison TableData Display
Kanban BoardData Display
Calendar ViewData Display
Audit LogData Display
App HeaderNavigation
App SidebarNavigation
Breadcrumb TrailNavigation
Page TabsNavigation
Command MenuNavigation
Split PaneNavigation
Sign-in CardAuthentication
Sign-up CardAuthentication
Password RecoveryAuthentication
Code VerificationAuthentication · Block
Onboarding WizardAuthentication · Block
Workspace SetupAuthentication · Block
Coupon FieldCommerce
Quantity PickerCommerce
Cart ItemCommerce
Price SummaryCommerce
Order StatusCommerce
Product DetailCommerce · Block
Product ListingCommerce · Block
Cart DrawerCommerce · Block
CheckoutCommerce · Block
Order TrackingCommerce · Block
Subscription ManagementCommerce · Block
Announcement BarMarketing
Pricing ToggleMarketing
Testimonial CardMarketing
Product GalleryMarketing
Trust PanelMarketing
Newsletter FormMarketing
Hero SectionMarketing · Block
Feature ShowcaseMarketing · Block
Pricing SectionMarketing · Block
Testimonials SectionMarketing · Block
FAQ SectionMarketing · Block
Call to ActionMarketing · Block
Waitlist SectionMarketing · Block
Contact SectionMarketing · Block
Author CardContent
CommentContent
Reaction BarContent
Share MenuContent
Changelog EntryContent
Article PageContent · Block
Documentation PageContent · Block
Changelog PageContent · Block
Comment ThreadContent · Block
Community FeedContent · Block
Public ProfileContent · Block
Map FrameMaps
Map ControlsMaps
Map MarkerMaps
Map LegendMaps
Place CardMaps
Route SummaryMaps
Dashboard ShellApplication · Block
Settings PageApplication · Block
Profile PageApplication · Block
Team ManagementApplication · Block
Notification CenterApplication · Block
Billing PortalApplication · Block
Search ResultsApplication · Block
Resource ManagerOperations · Block
Data ExplorerOperations · Block
Import WorkflowOperations · Block
Approval QueueOperations · Block
Audit Log ViewerOperations · Block
Incident DashboardOperations · Block
Report BuilderOperations · Block
Document FieldBrazil
CEP FieldBrazil
Pix PaymentBrazil
Installment PickerBrazil