Cnippet

Controlled Accordion

Component

About

A controlled accordion built on Base UI whose open panels are driven by external React state, with a button to expand items programmatically and a live readout of which items are open.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Controlled Accordion to your project and fits it to your theme.

Code

How Controlled Accordion is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import Particle from "@/components/ui/v-accordion-4";

export default function Default() {
  return (
    <div className="flex min-h-svh w-full items-center justify-center p-8">
      <div className="w-full max-w-md">
        <Particle />
      </div>
    </div>
  );
}

More by Cnippet

View all
  • Team

    Team

    1.3K
  • Davincho Hero-1

    Davincho Hero-1

    682
  • Aero Hero-3

    Aero Hero-3

    558
  • Features

    Features

    508
  • Random Letter Swap Navigation

    Random Letter Swap Navigation

    484
  • Services with Animated Hover Modal

    Services with Animated Hover Modal

    464
  • Blogs

    Blogs

    396
  • Aero Hero-1

    Aero Hero-1

    356