Toggle
Form ControlsStable
Toggle button for on/off states. Built on Radix Toggle with default, outline, and secondary variants.
Quick Import
import { Toggle } from "@cohere-ai/waypoint-ui/toggle";Live Preview
Loading Toggle...
Props
| Name | Type | Default | Description |
|---|---|---|---|
variant | 'default' | 'outline' | 'secondary' | 'default' | Visual style |
size | 'default' | 'sm' | 'lg' | 'default' | Size |
pressed | boolean | - | Controlled pressed state |
defaultPressed | boolean | - | Default pressed state |
onPressedChange | function | - | Callback on press state change |
Examples
Bold Toggle
Toggle button for bold formatting
1 import { Toggle } from '@cohere-ai/waypoint-ui/toggle'; 2 3 <Toggle aria-label="Toggle bold" variant="outline"> 4 <BoldIcon /> 5 </Toggle>
Additional Resources
Found an Issue?
If you've encountered a bug or have feedback about the Toggle component, please report it to our team. Your feedback helps us improve Waypoint.
Available for all users • Issue will be created in Linear
Was this page helpful?
Your feedback helps us improve our documentation.
Need Help?
Check out the Whitelabeling Playground to explore customization options or visit the Developer Guide for integration help.