React Accordion Component API
Accordion API
New Year sale. Skyrocket your business in 2025!
Extra 25% off for all sale items + Free CoreUI Icons PRO with every order!
Limited-time offer for the first 100 customers in 2025. Use code 2025SKY25 at checkout.
Limited-time offer for the first 100 customers in 2025. Use code 2025SKY25 at checkout.
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'