Aurora AI Reasoning
aurora-dinglebear-ai/aurora-ai-reasoningUnverifiedBlock
Aurora-native reasoning parity surface from AI Elements.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/dinglebear-ai/aurora/main/aurora-ai-reasoning.jsonSource
1"use client"23import * as React from "react"4import { Brain, ChevronDown } from "lucide-react"5import { Button } from "@/registry/aurora/ui/button"67// ---------------------------------------------------------------------------8// Reasoning — collapsible chain-of-thought summary.9//10// CD parity: orange rail + orange brain glyph, "Reasoned for Ns" / "Reasoning…"11// label, a streaming bullet, and a blinking cursor on the live tail. Axon orange12// is the AI/automation identity color. No violet.13//14// Architecture is kept standalone (not delegated to Thinking) so the Reasoning15// surface can carry its own reasoning styling without leaking into the16// shared Chain-of-thought / Plan variants.17// ---------------------------------------------------------------------------1819// Styles: registry/aurora/styles/aurora-components.css (@layer aurora-components).20const AXON = "var(--axon-orange)"2122export interface ReasoningProps {23 /** Streaming summary tail — shows the "Reasoning…" orange label, bullet and cursor. */24 isStreaming?: boolean25 /** Seconds spent reasoning — renders the "Reasoned for Ns" label. */26 duration?: number27 /** Start expanded. */28 defaultOpen?: boolean29 /** Reasoning body. Prefer children; `content` is kept for back-compat. */30 content?: string31 children?: React.ReactNode32}3334// Blinking cursor for the live streaming tail.35function Cursor() {36 return (37 <span38 aria-hidden="true"39 style={{40 display: "inline-block",41 width: "2px",42 height: "1em",43 background: AXON,44 marginLeft: "2px",45 verticalAlign: "text-bottom",46 borderRadius: "1px",47 animation: "aurora-reasoning-blink 1s step-end infinite",48 }}49 />50 )51}5253const Reasoning = function Reasoning({ ref, isStreaming, duration, defaultOpen, content, children }: ReasoningProps & { ref?: React.Ref<HTMLDivElement> }) {54 const [open, setOpen] = React.useState(defaultOpen ?? false)5556 const label =57 duration !== undefined ? `Reasoned for ${duration}s` : isStreaming ? "Reasoning…" : "Reasoning"5859 const body = children ?? content6061 return (62 <div ref={ref} style={{ display: "block", width: "100%", minWidth: 0 }}>63 {/* Header — brain glyph + label + disclosure chevron */}64 <Button65 variant="plain"66 size="unstyled"67 onClick={() => setOpen((o) => !o)}68 aria-expanded={open}69 style={{70 display: "inline-flex",71// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from aurora
All 176 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Aurora AI Actionaurora-ai-action | aurora | Blocks | Unverified | 1 dep | |
| Aurora AI Actionsaurora-ai-actions | aurora | Blocks | Unverified | 1 dep | |
| Aurora AI Agentaurora-ai-agent | aurora | Blocks | Unverified | 1 dep | |
| Aurora AI Image Gridaurora-ai-ai-image-grid | aurora | Blocks | Unverified | 1 dep | |
| Aurora AI Attachmentsaurora-ai-attachments | aurora | Blocks | Unverified | 1 dep | |
| Aurora AI Audio Playeraurora-ai-audio-player | aurora | Blocks | Unverified | 1 dep | |
| Aurora AI Branchaurora-ai-branch | aurora | Blocks | Unverified | 1 dep | |
| Aurora AI Canvasaurora-ai-canvas | aurora | Blocks | Unverified | 1 dep |
