Rad UI is still under active development. You are free to use it in your projects, but expect breaking changes. If you'd like to contribute to Rad UI, please check out Getting Started

Toggle

Toggles are used to switch between two states. They are commonly used in settings, forms, and more.

import Toggle from '@radui/ui/Toggle'"

const ToggleExample = ()=>{
    const [pressed, setPressed] = React.useState(false)

    const handleChange = (newPressed)=>{
        setPressed(newPressed)
    }
    return <Toggle defaultPressed={false} onChange={handleChange} >
            <Icon/>
        </Toggle>
}