Toggle Content
Allows users to toggle snippets of content open and closed using a button.
Installation
Install
yarn add @iag/chroma-react-ui.components
Import
import { ToggleContent } from '@iag/chroma-react-ui.components';
Used to reveal small snippets of content to avoid cluttering the layout.
Default
Show/hide defined content
A component which initially hides the component children and displays a button with the text from the prop buttonText which toggles the display between hidden and visible
Expanded state
Properties
Name
Description
- id*stringHTML id attribute for ToggleContent
- buttonText*stringThe text of the toggle content button
- classNamestringAdditional CSS classes to be applied
- isExpandedbooleanBoolean indicating if the toggle content is expanded