---
title: Collapse
tags: visual,children,state,intermediate
---
Renders a component with collapsible content.
- Use the `React.setState()` hook to create the `isCollapsed` state variable with an initial value of `props.collapsed`.
- Use an object, `style`, to hold the styles for individual components and their states.
- Use a `