Switch

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"

Examples

Overview

Controlled state

Grouped settings

Platforms

iOS 26Android
Native componentToggle (switch style)Switch
LookThe iOS 26 switch, a capsule with a sliding knobA 31x14dp track under a 20dp thumb that slides across it

API

PropTypeDefaultDescription
checkedboolean—Controlled state
defaultCheckedbooleanfalseInitial state (uncontrolled)
onCheckedChange(nextState: boolean) => void—Called when toggled
color"primary" | "accent"ThemeProvider's selectionColorOn track: the Plex primary (the ink, or a brand's) or the accent
labelReactNode—A label beside the switch
descriptionReactNode—Secondary text under the label
labelPosition"start" | "end""end"Where the label stands
disabledbooleanfalseKeeps its state, mutes it and takes no presses
accessibilityLabelstring—Name of a switch without a label
testIDstring—Test id
styleStyleProp<ViewStyle>—Style of the switch's row