mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-20 12:23:02 +00:00
docs(toggle): add "Hidden label text" example
This commit is contained in:
parent
58011a4337
commit
ece62887e2
1 changed files with 6 additions and 0 deletions
|
@ -23,6 +23,12 @@ components: ["Toggle", "ToggleSkeleton"]
|
|||
|
||||
<Toggle labelText="Push notifications" on:toggle={e => console.log(e.detail)} />
|
||||
|
||||
### Hidden label text
|
||||
|
||||
Set `hideLabel` to `true` to visually hide the label text. It's recommended to still specify `labelText` for screen reader accessibility.
|
||||
|
||||
<Toggle labelText="Push notifications" hideLabel />
|
||||
|
||||
### Custom labels
|
||||
|
||||
<Toggle labelText="Push notifications" labelA="No" labelB="Yes" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue