🚀ReacUI is currently in Beta. We're actively improving it! ❣️
Accordion
A vertically stacked set of interactive headings that reveal or hide associated content
Installation
The Accordion component is part of the ReacUI library. Install the package to use it in your project.
Import
Import the Accordion component into your React component.
Basic Accordion
A basic accordion component with a header and content section.
Multiple Accordions
Multiple accordion items can be grouped together. By default, only one item can be opened at a time.
Customization
The Accordion component can be customized with different styles and behavior.
API Reference
The following props are available for the Accordion components.
| Component | Prop | Type | Default | Description |
|---|---|---|---|---|
| Accordion | allowMultiple | boolean | false | Allow multiple accordion items to be expanded at once. |
| variant | string | 'default' | Visual style variant: 'default', 'primary', etc. | |
| Accordion.Item | className | string | '' | Additional CSS classes to apply. |
| Accordion.Header | className | string | '' | Additional CSS classes for the header. |
| Accordion.Content | className | string | '' | Additional CSS classes for the content. |