UI: Switch
An on and off switch for settings that apply at once. Import the token file once (@pithyx/ui/tokens.css) and wrap the app in UiProvider; see @pithyx/ui.
Generated from the TSDoc comments of @pithyx/ui 1.0.0-rc.9 at build time; the text below the headings is the comment in the source.
Interfaces
Section titled “Interfaces”SwitchProps
Section titled “SwitchProps”The props of Switch: React Aria’s switch field props plus the label.
Extends
Section titled “Extends”Omit<SwitchFieldProps,"className"|"children">
Properties
Section titled “Properties”children
Section titled “children”children: ReactNode;The label, also the accessible name.
Functions
Section titled “Functions”Switch()
Section titled “Switch()”function Switch(props): Element;An on and off switch with its label, for settings that apply at once.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
props |
SwitchProps |
React Aria’s switch field props (isSelected, onChange, isDisabled) plus the label. |
Returns
Section titled “Returns”Element
The switch with its label.