Skip to main content

Examples

Default

Disabled

With Info

All Variants

Disabled Checked

Props

SwitchField

A labelled switch field with optional helper text and info tooltip. Composes the Switch component with a <label> and description.
string
Additional CSS class name for the outer wrapper.
string
Descriptive text displayed below the label.
string
default:"More information"
Accessible label for the info tooltip trigger button. Override for i18n.
string
Tooltip text shown when hovering the info icon next to the label.
string
Label text displayed next to the switch.
"left" | "right"
default:"right"
Side on which the switch is placed relative to the label.
"small" | "default"
default:"default"
Size variant of the switch and accompanying text.

Exported types

Also exported from @fanvue/ui: SwitchFieldOrientation, SwitchFieldProps.
Setup: Installation · Theming