About
A toggle switch control with jelly squash-and-stretch press physics and a bouncy spring animation when switching between checked and unchecked.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Motion Switch to your project and fits it to your theme.
Code
How Motion Switch is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { Switch } from "@/components/ui/motion-switch";
import React from "react";
export default function SwitchDemo() {
const [checked, setChecked] = React.useState(true);
return (
<div className="flex items-center justify-center w-full h-full min-h-[200px]">
<Switch checked={checked} onCheckedChange={setChecked} />
</div>
);
}








