Switch
Accessible toggle switch with themed active/inactive colors.
v0.1.0NativeWindStyleSheetiOSAndroidExpo Go
Preview
Installation
npx nativra-cli add switchWrites Switch.tsx to components/ui, rewrites imports to your aliases and records hashes in nativra.lock.json, along with 1 registry dependency. Existing files are never overwritten without asking.
Want to try it first? Open it in the playground: a real React Native project in your browser, with this item installed by the CLI.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| value | boolean | required | Active toggle state |
| onValueChange | (value: boolean) => void | required | Callback when switch toggles |
| disabled | boolean | false | Disables interaction |
Source
Exactly what the CLI writes, before your import aliases are applied.
Dependencies
Used by
- Account Settings FlowTemplateEnterprise SaaS account, organization seats, security sessions, and billing management flow.
- Settings FlowTemplateA comprehensive mobile settings screen template with account profile header, preference toggles, security options, and logout dialog.
- Settings ListBlockReady-to-use mobile settings group with switches, badges, and navigation rows.