Collapse

Collapse

import Collapse from "@kiwicom/orbit-components/lib/Collapse";
<Collapse label="Duration">
<Slider defaultValue={5} onChange={value => doSomething(value)} />
</Collapse>

Props

NameTypeDefaultDescription
actionsReact.NodeActions which will be render next to arrow.
childrenReact.NodeThe children that should be collapsed.
idstringSet id for Collapse
dataTeststringOptional prop for testing purposes.
expandedbooleanIf you pass either true or false the Collapse component will controlled component and you will have to manage the state via onClick.
initialExpandedbooleanfalseIf true the Collapse component will be expanded on the initial render.
labelTranslationThe rendered label of the Collapse.
customLabelReact.NodeThe rendered custom label of the Collapse.
onClick(event, state) => void \| PromiseCallback for handling onClick event.