Collapsible
The Collapsible component can be used to hide and show elements. By default,
it animates the expanding and collapsing of its content, but this can be configured
through props.
Basic example
The Collapsible's expanded prop comes from the outer component's state.
ReferenceError: React is not definedProps
| Property | Required | Type | Default | Description |
|---|---|---|---|---|
delay | no | Number | 200 | Duration (in milliseconds) of expand/collapse animation |
expanded | no | Boolean | Whether the component is expanded | |
onEntered | no | Function | Callback called when animation begins | |
onExited | no | Function | Callback called when animation ends |
Imports
Import React components (including CSS):
import {Collapsible} from 'pivotal-ui/react/collapsible';