React Accordion Component API
Accordion API
Explore the API reference for the React Accordion component and discover how to effectively utilize its props for customization.
On this page
CAccordion#
import { CAccordion } from '@coreui/react'// orimport CAccordion from '@coreui/react/src/components/accordion/CAccordion'| Property | Default | Type |
|---|---|---|
| activeItemKey# | - | string, number |
The active item key. | ||
| alwaysOpen# | false | 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. | ||
| flush# | - | boolean |
Removes the default background-color, some borders, and some rounded corners to render accordions edge-to-edge with their parent container. | ||
CAccordionBody#
import { CAccordionBody } from '@coreui/react'// orimport CAccordionBody from '@coreui/react/src/components/accordion/CAccordionBody'| Property | Default | Type |
|---|---|---|
| className# | - | string |
A string of all className you want applied to the base component. | ||
CAccordionHeader#
import { CAccordionHeader } from '@coreui/react'// orimport CAccordionHeader from '@coreui/react/src/components/accordion/CAccordionHeader'| Property | Default | Type |
|---|---|---|
| className# | - | string |
A string of all className you want applied to the base component. | ||
CAccordionItem#
import { CAccordionItem } from '@coreui/react'// orimport CAccordionItem from '@coreui/react/src/components/accordion/CAccordionItem'