Toggles are used to switch between two states. They are commonly used in settings, forms, and more.
| Prop | Type | Default | Description |
|---|---|---|---|
color | string | null | Accent Color of the toggled item |
Toggles are used to switch between two states. They are commonly used in settings, forms, and more.
Reactimport Toggle from "@radui/ui/Toggle"; const ToggleExample = () => { const [pressed, setPressed] = React.useState(false) const handleChange = (newPressed) => { setPressed(newPressed) } return ( <Toggle pressed={pressed} onPressedChange={handleChange}> <Icon /> </Toggle> ) }
| Prop | Type | Default | Description |
|---|---|---|---|
color | string | null | Accent Color of the toggled item |