Edu Calvo

Accordion

Forms 65

About

Here is Accordion component

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

Code

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

Usage.tsx

"use client"

import React from "react"

import BasicDropdown from "@/components/ui/accordion-2"

const items = [
  { id: 1, label: "Small" },
  { id: 2, label: "Medium" },
  { id: 3, label: "Large" },
  { id: 4, label: "Extra Large" },
]

const DropdownDemo = () => {
  return (
    <div className="flex w-full max-w-xs flex-col gap-4 p-8">
      <h3 className="text-lg font-medium">Select a size</h3>
      <BasicDropdown
        label="Choose a size"
        items={items}
        onChange={(item) => console.log("Selected:", item.label)}
      />
    </div>
  )
}

export default DropdownDemo

Dependencies

More by Edu Calvo

View all
  • Scrollable Card Stack

    Scrollable Card Stack

    262
  • AI Task List

    AI Task List

    180
  • Pixel Flow Field

    Pixel Flow Field

    177
  • Siri Orb

    Siri Orb

    172
  • Cursor Follow

    Cursor Follow

    162
  • Gravity Stars

    Gravity Stars

    146
  • Agent Avatar

    Agent Avatar

    144
  • Coverflow Carousel

    Coverflow Carousel

    126

More in Forms

View all
  • Contact Card

    Contact Card

    1.1K
  • Premium Auth

    Premium Auth

    547
  • Login 2

    Login 2

    10
  • Form

    Form

    17
  • Form

    Form

    20
  • Login 1

    Login 1

    59
  • Authentication Card

    Authentication Card

    50
  • Card Studio

    Card Studio

    46