React Collapse Component API

Collapse 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 Collapse component and discover how to effectively utilize its props for customization.

On this page

CCollapse#

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

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

horizontal#-boolean

Set horizontal collapsing to transition the width instead of height.

onHide#-() => void

Callback fired when the component requests to be hidden.

onShow#-() => void

Callback fired when the component requests to be shown.

visible#-boolean

Toggle the visibility of component.