Switch

Animated on/off toggle.

An on/off toggle, animated on the UI thread.

Installation

Switch ships with the library — no separate install.

import { Switch } from 'panelui-native';

Usage

<Switch value={enabled} onValueChange={setEnabled} />

Variants

size

  • sm
  • md (default)

API Reference

Switch

PropTypeDefaultDescription
classNamestring
valueboolean
onValueChange(value: boolean) => void
disabledboolean

Every part also accepts the underlying React Native props (ViewProps or TextProps) and a className for Tailwind utilities.

On this page