An accordion is a vertically stacked list of interactive items that can be expanded or collapsed. Each item can be expanded or collapsed independently from the others.
Third Party Library
This component uses at least one third party library under the hood. Refer
to the library's documentation below for more information on the API.
API Documentation
Import
import { Accordion } from " @aeonkit/react " ;
Usage
Single
Single accordion allows only one item to be expanded at a time.
< Accordion type = " single " >
< Accordion.Item value = " item-1 " >
< Accordion.Trigger > Item 1 </ Accordion.Trigger >
< Accordion.Content > content </ Accordion.Content >
< Accordion.Item value = " item-2 " >
< Accordion.Trigger > Item 2 </ Accordion.Trigger >
< Accordion.Content > content </ Accordion.Content >
< Accordion.Item value = " item-3 " >
< Accordion.Trigger > Item 3 </ Accordion.Trigger >
< Accordion.Content > content </ Accordion.Content >
Multiple
Multiple accordion allows multiple items to be expanded at a time.
< Accordion type = " multiple " >
< Accordion.Item value = " item-1 " >
< Accordion.Trigger > Item 1 </ Accordion.Trigger >
< Accordion.Content > content </ Accordion.Content >
< Accordion.Item value = " item-2 " >
< Accordion.Trigger > Item 2 </ Accordion.Trigger >
< Accordion.Content > content </ Accordion.Content >
< Accordion.Item value = " item-3 " >
< Accordion.Trigger > Item 3 </ Accordion.Trigger >
< Accordion.Content > content </ Accordion.Content >
Props
API Interface : AccordionProps
API Interface : AccordionContentProps
API Interface : AccordionItemProps
API Interface : AccordionTriggerProps