Demos
Unchecked ToggleButton
Code Editor
<ToggleButton label="Label:" text="Toggle Me" />
Checked ToggleButton
Code Editor
<ToggleButton label="Label:" text="Checked ToggleButton" checked on_change={({ checked }) => { console.log('on_change', checked) }} />
Default ToggleButton group
Code Editor
<ToggleButton.Group label="ToggleButton Group:" value="first" on_change={({ value }) => { console.log('on_change', value) }} > <ToggleButton text="First" value="first" /> <ToggleButton text="Second" value="second" /> <ToggleButton text="Third" value="third" /> </ToggleButton.Group>
Multi-select ToggleButton group
Code Editor
<ToggleButton.Group label="Multi-select:" multiselect={true} values={['first', 'third']} on_change={({ values }) => { console.log('on_change', values) }} > <ToggleButton text="First" value="first" /> <ToggleButton text="Second" value="second" /> <ToggleButton text="Third" value="third" /> </ToggleButton.Group>