Skip to content

Switch

Animated toggle built on RN Animated (no reanimated dep).

Terminal window
npx github:truongnat/rnui#cli add switch

or directly via the shadcn CLI:

Terminal window
npx shadcn add https://<registry-base>/r/nativewind/switch.json # or /uniwind/
const [on, setOn] = useState(false);
<Switch checked={on} onCheckedChange={setOn} />
  • components/ui/switch.tsx

Installs together with: utils, theme