Toggle button
Toggle button
Component demo
Interactive example
<ic-toggle-buttonid="toggle-btn"label="Switch to oat milk"></ic-toggle-button>
<IcToggleButtonlabel="Switch to oat milk"onIcToggleChecked={(event)=>console.log(event.detail.checked)}/>
Toggle button details
Props
All components also accept native properties supported by the DOM, such asclassName
and
style
.
|
|
|
---|---|---|
|
The accessible label that will be applied to the toggle button. This is required for the icon variant of toggle buttons. |
|
|
The appearance of the toggle button. |
|
|
If |
|
|
If |
|
|
The placement of the icon in relation to the toggle button label. |
|
|
The label to display in the toggle button. This is required for the default variant of toggle buttons. |
|
|
If |
|
|
The size of the toggle button to be displayed. |
|
|
If |
|
|
The variant of the toggle button. |
|
The accessible label that will be applied to the toggle button. This is required for the icon variant of toggle buttons. |
The appearance of the toggle button. |
If |
If |
|