Skip to main content

Toggle

Form Controls
Stable

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

NameTypeDefaultDescription
variant'default' | 'outline' | 'secondary''default'Visual style
size'default' | 'sm' | 'lg''default'Size
pressedboolean-Controlled pressed state
defaultPressedboolean-Default pressed state
onPressedChangefunction-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>

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.