About
A toggle control rendered as a native checkbox with role="switch" that follows the Material 3 Expressive spec, including pressed-shape motion and an optional icon inside the thumb.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Material 3 Switch to your project and fits it to your theme.
Code
How Material 3 Switch is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import Switch from "@/components/ui/switch";
export default function DisabledSwitchDemo() {
return (
<div className="flex w-full items-center justify-center p-10">
<div className="flex flex-col gap-3">
<label className="flex items-center gap-4">
<Switch disabled />
<span className="text-base text-[#1d1b20]">Unavailable</span>
</label>
<label className="flex items-center gap-4">
<Switch disabled defaultChecked />
<span className="text-base text-[#1d1b20]">Unavailable and on</span>
</label>
</div>
</div>
);
}











