React Accordion Component API

Accordion API

Rocket
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.

Explore the API reference for the React Accordion component and discover how to effectively utilize its props for customization.

CAccordion#

import { CAccordion } from '@coreui/react'
// or
import CAccordion from '@coreui/react/src/components/accordion/CAccordion'
PropertyDefaultType
activeItemKey#-string, number

The active item key.

alwaysOpen#falseboolean

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'
// or
import CAccordionBody from '@coreui/react/src/components/accordion/CAccordionBody'
PropertyDefaultType
className#-string

A string of all className you want applied to the base component.

CAccordionHeader#

import { CAccordionHeader } from '@coreui/react'
// or
import CAccordionHeader from '@coreui/react/src/components/accordion/CAccordionHeader'
PropertyDefaultType
className#-string

A string of all className you want applied to the base component.

CAccordionItem#

import { CAccordionItem } from '@coreui/react'
// or
import CAccordionItem from '@coreui/react/src/components/accordion/CAccordionItem'
PropertyDefaultType
className#-string

A string of all className you want applied to the base component.

itemKey#-string, number

Item key.