Skip to content

Toggle

A toggle component with support for sizes and colors. Form compatible.

There’s three different sizes for toggles:

The toggle component supports all default colorways.

If you want to use this component in a form, you’re in luck! There’s two props you can pass: isRequired and name.

The first one does what it says it does, while the latter sets the name attribute so you can access the toggle in, for example, the FormData returned by a submission. Here’s an example showing how to set both of them: