kanchanasw

Toggle

Buttons

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>
  );
}

Dependencies

More by kanchanasw

View all
  • Sketch Tabs

    Sketch Tabs

    146
  • Hand-Drawn Checkbox

    Hand-Drawn Checkbox

    76
  • Sketch Textarea

    Sketch Textarea

    68
  • Sketch Hover Card

    Sketch Hover Card

    53
  • Sketch Button

    Sketch Button

    28
  • Pagination

    Pagination

    12
  • Radial Menu

    Radial Menu

    7
  • Sketch Prompt Input

    Sketch Prompt Input

    3

More in Buttons

View all
  • Hero Button

    Hero Button

    21
  • Eclipse Button

    Eclipse Button

    9
  • Button

    Button

    141
  • Button

    Button

    19
  • Texture Button

    Texture Button

    111
  • HeroUI Toggle Button

    HeroUI Toggle Button

  • Random Letter Swap CTA Buttons

    Random Letter Swap CTA Buttons

    64
  • Water Ripple Button

    Water Ripple Button

    4