diff --git a/apps/docs/app/globals.css b/apps/docs/app/globals.css
index a864e02..e393a87 100644
--- a/apps/docs/app/globals.css
+++ b/apps/docs/app/globals.css
@@ -3,6 +3,7 @@
@import "fumadocs-ui/css/preset.css";
@import "../node_modules/tw-shimmer/src/index.css";
@source "../node_modules/@assistant-ui/chords/dist";
+@source inline("shimmer");
/* Safelist color utilities for playground dynamic class inputs.
Tailwind 4 @source inline() scans for literal class names — no brace expansion. */
diff --git a/apps/docs/app/page.tsx b/apps/docs/app/page.tsx
index d81481c..ab5929d 100644
--- a/apps/docs/app/page.tsx
+++ b/apps/docs/app/page.tsx
@@ -44,6 +44,12 @@ const majorChords = [
description: "File and image attachments for composer and messages.",
href: "/docs/major-chords/attachment",
},
+ {
+ name: "ReasoningAccordion",
+ description:
+ "Collapsible accordion for AI reasoning with auto-expand during streaming.",
+ href: "/docs/major-chords/reasoning-accordion",
+ },
];
const minorChords = [
diff --git a/apps/docs/components/demo/reasoning-accordion-demo.tsx b/apps/docs/components/demo/reasoning-accordion-demo.tsx
new file mode 100644
index 0000000..a7b791f
--- /dev/null
+++ b/apps/docs/components/demo/reasoning-accordion-demo.tsx
@@ -0,0 +1,108 @@
+"use client";
+
+import {
+ AssistantRuntimeProvider,
+ MessagePrimitive,
+ ThreadPrimitive,
+ useLocalRuntime,
+} from "@assistant-ui/react";
+import { ReasoningAccordion } from "@assistant-ui/chords";
+import { DemoWrapper } from "./demo-wrapper";
+import type { ChatModelAdapter } from "@assistant-ui/react";
+import { FC } from "react";
+
+const REASONING =
+ "Let me think about this step by step. First, I need to consider the quantum mechanical principles involved. Entanglement occurs when particles become correlated in such a way that the quantum state of each particle cannot be described independently of the others.";
+
+const TEXT =
+ "Quantum entanglement is a phenomenon where two particles become linked, so measuring one instantly affects the other — no matter the distance between them. Einstein famously called it 'spooky action at a distance.'";
+
+const demoAdapter: ChatModelAdapter = {
+ async *run({ abortSignal }) {
+ for (let i = 0; i < REASONING.length; i++) {
+ if (abortSignal.aborted) return;
+ await new Promise((r) => setTimeout(r, 8));
+ yield {
+ content: [
+ { type: "reasoning" as const, text: REASONING.slice(0, i + 1) },
+ ],
+ };
+ }
+
+ for (let i = 0; i < TEXT.length; i++) {
+ if (abortSignal.aborted) return;
+ await new Promise((r) => setTimeout(r, 12));
+ yield {
+ content: [
+ { type: "reasoning" as const, text: REASONING },
+ { type: "text" as const, text: TEXT.slice(0, i + 1) },
+ ],
+ };
+ }
+ },
+};
+
+export function ReasoningAccordionDemo() {
+ const runtime = useLocalRuntime(demoAdapter);
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+ Send a message to trigger the reasoning demo
+
+
+