About
A toggle switch wired into a form with TanStack Form and validated by a Zod schema that surfaces a field error when the required opt-in is off.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Switch with TanStack Form and Zod to your project and fits it to your theme.
Code
How Switch with TanStack Form and Zod is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { Switch13 } from "@/components/ui/switch-13";
import { Toaster } from "sonner";
export default function Demo() {
return (
<div className="flex min-h-[320px] w-full items-center justify-center p-6">
<Switch13 />
<Toaster />
</div>
);
}
















