Toggle
<sc-toggle></sc-toggle>
This component let users create toggle.
- Preview
- Code
<sc-toggle summary="Toggle Summary">My Toggle Text</sc-toggle>
Component Codex
Properties
Property | Description | Type | Default |
---|---|---|---|
borderless | Is this a borderless toggle? | boolean | false |
collapsible | Are these collapsible? | boolean | true |
disabled | Disables the details so it can't be toggled. | boolean | false |
open | Indicates whether or not the details is open. You can use this in lieu of the show/hide methods. | boolean | false |
shady | Is this a shady | boolean | false |
showControl | Should we show a radio control? | boolean | false |
showIcon | Should we show the arrow icon? | boolean | true |
summary | The summary to show in the details header. If you need to display HTML, use the `summary` slot instead. | string |
Events
Event | Description | Type |
---|---|---|
scHide | Show the toggle | CustomEvent<void> |
scShow | Show the toggle | CustomEvent<void> |
Shadow Parts
Part | Description |
---|---|
base | |
body | |
content | |
header | |
radio | |
summary | |
summary-icon |