Switch

A component that lets users instantly turn an option on or off.

@radix-ui/react-switch

Installation


1

Install the following dependencies:

npx shadcn@latest add https://sbthemes-storev2.vercel.app/r/switch.json

Examples


Disabled


API Reference

This component is based on the <button> element and supports all of its props and adds:

PropTypeDefault
checkedbooleanfalse
disabledbooleanfalse