Skip to main content
Switch
@coinbase/cds-web@8.34.1
A control for toggling between on and off.
Import
import { Switch } from '@coinbase/cds-web/controls/Switch'
SourceView source codeStorybookView StorybookFigmaView Figma (internal only)
Peer dependencies
  • framer-motion: ^10.18.0
Related components
View as Markdown
Loading...

Customizing Colors

Like other control components (i.e. Radio, Checkbox), you can customize the color of the Switch by setting the controlColor prop.

Loading...

For more advanced color customization, you can use additional style props like background, borderColor, borderWidth, and color:

Loading...

Is this page useful?

Coinbase Design is an open-source, adaptable system of guidelines, components, and tools that aid the best practices of user interface design for crypto products.