Search…
⌃K
Links

Switch

A simple switch component.

Usage

import React, { useState } from 'react'
import { Switch } from '@aragon/ui'
const App = () => {
const [checked, setChecked] = useState(false)
return <Switch checked={checked} onChange={setChecked} />
}

Demonstration

Props

checked

TYPE
DEFAULT VALUE
Boolean
false

disabled

TYPE
DEFAULT VALUE
Boolean
false

onChange

TYPE
DEFAULT VALUE
Function: (checked: Boolean) -> *
() => {}
Last modified 6mo ago