We're actively working on new components and features. Stay tuned! Head over to our GitHub to see what's coming next.
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 pressed={pressed} onPressedChange={handleChange}> <Icon /> </Toggle> ) }
Prop | Type | Default | Description |
---|---|---|---|
color | string | null | Accent Color of the toggled item |