Render assistant reasoning in a collapsible row. State-driven (thinking shimmer / thought static). Self-contained port from 21st.dev Agent Elements with React-only collapsible (no @base-ui/react) and inline shimmer keyframes.
import { ThinkingTool } from "@/components/ui/thinking-tool"; export default function Demo() { return ( <div className="flex items-center justify-center w-full min-h-screen bg-background p-8 overflow-hidden"> <div className="w-fit"> <ThinkingTool state="thinking" content="Draft" defaultOpen /> </div> </div> ); }
Part of Agent Elements — browse the full library on 21st.dev.