boardui

Accordion

Component

About

A set of stacked, expandable sections (FAQ-style, settings groups, order details) with divided, contained and separated visual styles and a smooth height/blur transition.

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

import { Accordion, AccordionItem } from "@/components/ui/accordion";
import {
  RiBankCardLine,
  RiNotification3Line,
  RiShieldKeyholeLine,
} from "@remixicon/react";

export default function AccordionSeparatedDemo() {
  return (
    <Accordion
      variant="separated"
      allowsMultipleExpanded
      defaultExpandedKeys={["notifications"]}
      className="w-full max-w-[560px]"
    >
      <AccordionItem
        id="notifications"
        icon={RiNotification3Line}
        title="Notifications"
        description="Email, push, and Slack"
      >
        <p>Email me about mentions</p>
        <p>Push notifications</p>
        <p>Weekly summary in Slack</p>
      </AccordionItem>
      <AccordionItem
        id="security"
        icon={RiShieldKeyholeLine}
        title="Security"
        description="Two-factor sign-in and sessions"
      >
        <p>Require two-factor sign-in</p>
        <p>Sign out idle sessions after 12 hours</p>
      </AccordionItem>
      <AccordionItem
        id="billing"
        icon={RiBankCardLine}
        title="Billing"
        description="Managed by your workspace owner"
        isDisabled
      >
        <p>Only the workspace owner can change billing.</p>
      </AccordionItem>
    </Accordion>
  );
}

Dependencies

More by boardui

View all
  • Social Button

    Social Button

    4
  • Modal Dialog

    Modal Dialog

    3
  • Select

    Select

    1
  • Segmented Control

    Segmented Control

  • Date Calendar

    Date Calendar

  • Composer Loader

    Composer Loader

  • Slider

    Slider

  • File Upload

    File Upload