Toggle
Two-state pressable.
Install
Section titled “Install”npx github:truongnat/rnui#cli add toggleor directly via the shadcn CLI:
npx shadcn add https://<registry-base>/r/nativewind/toggle.json # or /uniwind/npm dependencies installed automatically: tailwind-variants
const [pressed, setPressed] = useState(false);<Toggle pressed={pressed} onPressedChange={setPressed}> <Text>Toggle</Text></Toggle>Source
Section titled “Source”components/ui/toggle.tsx
Installs together with: utils, theme