About
A hand-drawn, sketch-style pressed/unpressed toggle button for binary on/off controls like bold or formatting switches.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Toggle to your project and fits it to your theme.
Code
How Toggle is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
import * as React from "react";
import Toggle from "@/components/ui/toggle";
const settings = {
size: "md" as "sm" | "md" | "lg",
};
export default function Demo(props: Partial<typeof settings>) {
const s = { ...settings, ...props };
const [pressed, setPressed] = React.useState(true);
return (
<div className="flex items-center justify-center h-full w-full">
<Toggle size={s.size} pressed={pressed} onPressedChange={setPressed}>
Bold
</Toggle>
</div>
);
}
















