React Collapse Component API
Collapse API
Explore the API reference for the React Collapse component and discover how to effectively utilize its props for customization.
CCollapse
import { CCollapse } from '@coreui/react-pro'
| Property | Default | Type |
|---|
| className | - | string |
A string of all className you want applied to the base component. |
| hiddenUntilFound6.0.0+ | - | boolean |
Hide the collapsed content with hidden="until-found" instead of taking it out of the layout, so the browser's find-in-page searches it and reveals it on a match. onShow fires when it does — set show from it, or the stylesheet hides the content the reader was just sent to. |
| 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. |
| show6.0.0+ | - | boolean |
Toggle the visibility of component. |
| visibleDeprecated 6.0.0 | - | boolean |
Toggle the visibility of component. Use show instead — visible is ignored when show is set. |