Edu Calvo

Accordion

Forms 63

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

    240
  • AI Task List

    AI Task List

    167
  • Siri Orb

    Siri Orb

    164
  • Pixel Flow Field

    Pixel Flow Field

    157
  • Cursor Follow

    Cursor Follow

    155
  • Agent Avatar

    Agent Avatar

    136
  • Gravity Stars

    Gravity Stars

    124
  • Coverflow Carousel

    Coverflow Carousel

    110

More in Forms

View all
  • Premium Auth

    Premium Auth

    524
  • Contact Card

    Contact Card

    1K
  • Book A Demo 1

    Book A Demo 1

    73
  • Login 1

    Login 1

    53
  • Form

    Form

    137
  • Card Studio

    Card Studio

    41
  • SignInPage

    SignInPage

    667
  • Modern & Stunning sign in

    Modern & Stunning sign in

    1.6K