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
checked
TYPE
DEFAULT VALUE
Boolean
false
disabled
disabled
TYPE
DEFAULT VALUE
Boolean
false
onChange
onChange
TYPE
DEFAULT VALUE
Function
: (checked: Boolean) -> *
() => {}
Last updated
Was this helpful?