Thought
shadcn-collections/thoughtFreeComponent
Thought bubble or thinking indicator component
Install it
npx shadcn@latest add https://chatcn.me/r/thought.jsonSource
1import {2 Accordion,3 AccordionContent,4 AccordionItem,5 AccordionTrigger,6} from "@/components/ui/accordion";7import { cn } from "@/lib/utils";89type ThoughtContentProps = {10 className?: string;11 children: React.ReactNode;12};13export function ThoughtContent({ className, children }: ThoughtContentProps) {14 return (15 <AccordionContent16 className={cn("text-muted-foreground px-3 border-l-2", className)}17 >18 {children}19 </AccordionContent>20 );21}2223type ThoughTriggerProps = {24 className?: string;25 children: React.ReactNode;26};27export function ThoughtTrigger({ className, children }: ThoughTriggerProps) {28 return (29 <AccordionTrigger30 className={cn(31 "no-underline hover:no-underline text-muted-foreground hover:text-primary justify-start gap-2",32 className33 )}34 >35 <div className="flex gap-1 items-center">{children}</div>36 </AccordionTrigger>37 );38}3940type ThoughtProps = {41 className?: string;42 children: React.ReactNode;43};4445export function Thought({ children, className }: ThoughtProps) {46 return (47 <Accordion type="single" collapsible className={cn("", className)}>48 <AccordionItem value="item-1">{children}</AccordionItem>49 </Accordion>50 );51}
Files it writes
More from shadcn-collections
All 24 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Audio Visualizeraudio-visualizer | shadcn-collections | Components | Free | 4 deps | |
| Calendarcalendar | shadcn-collections | Components | Free | no deps | |
| Chat Containerchat-container | shadcn-collections | Components | Free | no deps | |
| Code Editorcode-editor | shadcn-collections | Components | Free | no deps | |
| Code Blockcodeblock | shadcn-collections | Components | Free | 1 dep | |
| Command Blockcommand-block | shadcn-collections | Components | Free | no deps | |
| Command Tabscommand-tabs | shadcn-collections | Components | Free | no deps | |
| Emailemail | shadcn-collections | Components | Free | no deps |
