Getting Started

Components

Themes

Please understand this website is built in react, the components are in react native. There may be slight differences!

Switch

Switch(on/off). Boolean type of input

1
Install by running this command!
npx uni-ui-kit install switch
2
Import the component!
import Switch from '../lib/ui/switch';
Properties table
animationDuration?
number
Animation duration of the switch going left and right
description?
React.ReactNode
Text beside the slider
defaultChecked?
boolean
default checked value
disabled?
boolean
disabled or not
onChange?
(value)=>void
Callback function when the value is changed
variant?
variant
variants
Library data types
Variants
primary, secondary, tertiary, success, warning, error, ghost
Colors will change according to theme(light, dark). Use when it is intended.