---
title: "Accordion"
description: "A stack of headings that expand and collapse their sections. Built on Base UI with full keyboard support and styled with Tailwind CSS."
plan: Free
docs: https://ui.edbn.me/docs/components/accordion
---

# Accordion

A stack of headings that expand and collapse their sections. Built on Base UI with full keyboard support and styled with Tailwind CSS.

## Installation

```bash
npx shadcn@4.19.0 add https://ui.edbn.me/r/accordion.json
```

## Dependencies
- npm: @base-ui/react@^1.8.0, lucide-react@^1.33.0
- edbn: edbn-base

## Usage

```tsx examples/accordion-basic.tsx
"use client";
import * as React from "react";
import {
  Accordion,
  AccordionContent,
  AccordionItem,
  AccordionTrigger,
} from "@/components/ui/accordion";

function Frame({ children }: { children: React.ReactNode }) {
  return <div className="w-full max-w-sm">{children}</div>;
}

export default function AccordionBasicPreview() {
  return (
    <Frame>
      <Accordion defaultValue={["shipping"]}>
        <AccordionItem value="shipping">
          <AccordionTrigger>How does shipping work?</AccordionTrigger>
          <AccordionContent>
            Orders usually arrive within 3–5 days.
          </AccordionContent>
        </AccordionItem>
        <AccordionItem value="returns">
          <AccordionTrigger>Can I return an item?</AccordionTrigger>
          <AccordionContent>Yes, within 30 days of delivery.</AccordionContent>
        </AccordionItem>
      </Accordion>
    </Frame>
  );
}
```

## Files
- components/ui/accordion.tsx (76 lines)

## For agents
- Base theme, once per project: npx shadcn@4.19.0 add https://ui.edbn.me/r/edbn-base.json
- MCP server with search, items, examples and source: https://ui.edbn.me/mcp
- Every page and item: https://ui.edbn.me/llms.txt
