Toggle switch for turning a setting on or off at once, as the trailing control of a list row.
import { Switch } from "@plexui/react-native"
| iOS 26 | Android |
|---|
| Native component | Toggle (switch style) | Switch |
| Look | The iOS 26 switch, a capsule with a sliding knob | A 31x14dp track under a 20dp thumb that slides across it |
| Prop | Type | Default | Description |
|---|
checked | boolean | — | Controlled state |
defaultChecked | boolean | false | Initial state (uncontrolled) |
onCheckedChange | (nextState: boolean) => void | — | Called when toggled |
color | "primary" | "accent" | ThemeProvider's selectionColor | On track: the Plex primary (the ink, or a brand's) or the accent |
label | ReactNode | — | A label beside the switch |
description | ReactNode | — | Secondary text under the label |
labelPosition | "start" | "end" | "end" | Where the label stands |
disabled | boolean | false | Keeps its state, mutes it and takes no presses |
accessibilityLabel | string | — | Name of a switch without a label |
testID | string | — | Test id |
style | StyleProp<ViewStyle> | — | Style of the switch's row |