Accordion

An Accordion component is a UI element that allows users to expand and collapse sections of content. It is commonly used to organize information in a compact and accessible manner, displaying only the headers by default and revealing the associated content when clicked. This helps improve the readability of complex or lengthy information by reducing clutter on the page.
# Demo

Demo Coming Soon

Accordion examples will be available soon.

# Usage
# Attributes
NameTypeDefaultDetails
classNamestring' 'You can customise by passing tailwind classes.
itemClassNamestring' 'You can customise by passing tailwind classes.
triggerClassNamestring' 'You can customise by passing tailwind classes.
contentClassNamestring' 'You can customise by passing tailwind classes.
typeAccordionTypesAccordionTypes.SINGLEYou can pass type of the accordion.
itemsAccordionListItem[]RequiredYou can pass list of accordion items.
keyExtractor(item: T, index: number) => string | numberOptionalCustom key extractor function for items.
renderTrigger(item: T, index: number) => React.ReactNodeOptionalCustom render function for accordion triggers.
renderContent(item: T, index: number) => React.ReactNodeOptionalCustom render function for accordion content.