The Accordion component can be used by importing { Accordion } from "finallyreact".
The { AccordionGroup } component can be used to control multiple Accordion components at once.
The Accordion component can be used by importing { Accordion } from "finallyreact".
The { AccordionGroup } component can be used to control multiple Accordion components at once.
Prop Name | Prop Type | Description |
---|---|---|
arrowProps | HTMLAttributes | Props for the arrow |
contentProps | HTMLAttributes | Props for the content |
customHeader | React.ReactNode | Custom header for the accordion |
disabled | boolean | Disables user interaction |
headerProps | HTMLAttributes | Props for the header |
initialOpen | boolean | Whether the accordion is open by default |
open | boolean | Whether the accordion is open |
preventAutoOpen | boolean | Disables the default open behavior on clicking the header. Useful when external logic determines the open state. |
rounded | boolean | Rounded accordion |
simple | boolean | A simple accordion with no styles |
text | string | Text content for the accordion |
title | string | React.ReactNode | Title for the accordion |
titleHeader | boolean | Whether the title is rendered as an h3 header element |
titleProps | HTMLAttributes | Props for the title |
Prop Name | Prop Type | Description |
---|---|---|
items | IAccordion[] | Array of accordion items (above) |
onOpen | (index: number) => void | Callback for when an accordion is opened |
selectedProps | IAccordion | Props for the selected accordion |
type | 'single' | 'multi' | Type of accordion group (single or multi) |