About
An interactive panel that smoothly expands and collapses its content with a spring-like height and fade animation, built on Radix Collapsible and Motion.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Radix Collapsible to your project and fits it to your theme.
Code
How Radix Collapsible is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import {
Collapsible,
CollapsibleContent,
CollapsibleTrigger,
} from "@/components/ui/radix-collapsible";
export default function RadixCollapsibleDemo() {
return (
<div className="flex min-h-[240px] w-full items-center justify-center">
<Collapsible>
<CollapsibleTrigger className="px-3 py-1.5 border-b text-start w-[200px]">
Recovery keys
</CollapsibleTrigger>
<CollapsibleContent keepRendered={false}>
<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>
</CollapsibleContent>
</Collapsible>
</div>
);
}







