About
An animated collapsible panel that smoothly expands and collapses its content with height and fade transitions when its trigger button is toggled.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Base Collapsible to your project and fits it to your theme.
Code
How Base Collapsible is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import {
Collapsible,
CollapsiblePanel,
CollapsibleTrigger,
} from "@/components/ui/base-collapsible";
export default function BaseCollapsibleDemo() {
return (
<Collapsible>
<CollapsibleTrigger className="px-3 py-1.5 border-b text-start w-[200px]">
Recovery keys
</CollapsibleTrigger>
<CollapsiblePanel>
<div className="pt-1.5 px-3 text-sm text-muted-foreground">
<div>alien-bean-pasta</div>
<div>wild-irish-burrito</div>
<div>horse-battery-staple</div>
</div>
</CollapsiblePanel>
</Collapsible>
);
}







