Anatomy
Anatomy
import {Toggle} from '@staffbase/spark';
<Toggle />Examples
Ghost variant
API reference
Toggle
Inherits props fromBase UI Toggle
| Name | Type | Description |
|---|---|---|
variant | outlineghost | The visual style of the toggle. Default: outline |
When to use
When not to use
How to use
Structure
Accessibility
Do
Announced to screen readers
“Bold, toggle button, not pressed”
With aria-label, the toggle is announced as “Bold, toggle button, not pressed”.
Don't
Announced to screen readers
“toggle button, not pressed” — the control has no name
Without a name, the toggle is announced only as “toggle button, not pressed”.