# Accordion

> The Accordion component is a flexible and accessible UI element built using Radix UI primitives. It allows for the creation of collapsible sections, ideal for organizing content in a compact and user-friendly manner. The component supports both single and multiple expanded items, making it versatile for various use cases.  Key features include: Radix UI Integration: Utilizes Radix UI for robust accessibility and state management. Customizable Styles: Easily style the accordion using Tailwind CSS classes. Animation Support: Smooth open and close animations enhance the user experience.  To enable animations, add the following to your tailwind.config.js: {   theme: {     extend: {       keyframes: {         "accordion-down": {           from: { height: "0" },           to: { height: "var(--radix-accordion-content-height)" },         },         "accordion-up": {           from: { height: "var(--radix-accordion-content-height)" },           to: { height: "0" },         },       },       animation: {         "accordion-down": "accordion-down 0.2s ease-out",         "accordion-up": "accordion-up 0.2s ease-out",       },     },   }, }  This component is ideal for creating FAQ sections, feature lists, or any content that benefits from being organized in an expandable format.

- Author: [Edil Ozi](https://21st.dev/@Edil-ozi)
- Library: [Edil Ozi](https://21st.dev/@Edil-ozi/library/edil-ozi)
- License: mit
- Tags: Accordion
- npm dependencies: lucide-react, @radix-ui/react-accordion
- Live preview: https://21st.dev/@Edil-ozi/components/accordion

## Install

```bash
npx shadcn@latest add "https://21st.dev/r/Edil-ozi/accordion?api_key=$API_KEY_21ST"
```

Requires a 21st API key (generate one at https://21st.dev/mcp) passed as `API_KEY_21ST`. Free accounts get a limited number of installs per day; unlimited on a paid plan — see https://21st.dev/pricing.

Full component directory: https://21st.dev/llms.txt · More like this: https://21st.dev/community/components/s/accordion.md
