| activeItemKeyDeprecated 6.0.0 | - | CAccordionItemKey |
Sets the initially open items when the component mounts. Use defaultOpenItemKeys instead, which takes the same single value. An accordion holds open items rather than an active one — active is the vocabulary of a selection, which is what CTabs has. |
| alwaysOpen | - | boolean |
Make accordion items stay open when another item is opened |
| className | - | string |
A string of all className you want applied to the base component. |
| defaultOpenItemKeys6.0.0+ | - | CAccordionItemKey, CAccordionItemKey[] |
Sets the initially open items when the component mounts. After initialization, the component manages the open items internally. Use it for uncontrolled usage. |
| flush | - | boolean |
Removes the default background-color, some borders, and some rounded corners to render accordions edge-to-edge with their parent container. |
| gap6.0.0+ | - | boolean |
Spaces the items apart and gives each one a full border radius, so the accordion reads as a stack of cards. |
| onChange6.0.0+ | - | ((keys: CAccordionItemKey[]) => void) |
Callback fired when the open items change. - In controlled mode (openItemKeys provided), you must update openItemKeys yourself based on the value received. - In uncontrolled mode, this callback is called after the internal state updates. |
| openItemKeys6.0.0+ | - | CAccordionItemKey, CAccordionItemKey[] |
Controls which items are open. When provided, the component operates in a controlled mode: update the value yourself from onChange. Takes a single key as well as an array — an array only opens more than one item under alwaysOpen, since the HTML Standard forbids leaving more than one open item in a name group. |
| size6.0.0+ | - | 'sm' |
Tighten padding, radius and font size for a more compact accordion. |
| theme6.0.0+ | - | 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'inverse', string |
Tint the open item with one of CoreUI’s themed colors. Closed items are untouched, so the theme marks what is currently expanded rather than recoloring the whole control. |