@bootstrap-styled/v4
Version:
twbs/bootstrap V4 UI Components made with bootstrap-styled. Work with css-in-js, react, styled-components, and Bootstrap Styled utilities.
23 lines (17 loc) • 600 B
Markdown
Manage easily dismissing content like modals and alerts or any other components with our `<Collapse />` component.
Add react `state` and `handleClick` function or use directly our example below.
`<Collapse />` component example:
```js
import { Button, Collapse, P } from '$PACKAGE_NAME';
initialState = {
isOpen: false,
};
<div>
<Button color="primary" className="mb-2" onClick={() => setState({ isOpen: !state.isOpen })}>Toggle</Button>
<Collapse isOpen={state.isOpen}>
<P>
Any content will be automatically hided and will appear after button click.
</P>
</Collapse>
</div>
```