kanchanasw

Toggle

Buttons 1

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

    78
  • Sketch Textarea

    Sketch Textarea

    68
  • Sketch Hover Card

    Sketch Hover Card

    53
  • Sketch Button

    Sketch Button

    29
  • Pagination

    Pagination

    12
  • Radial Menu

    Radial Menu

    7
  • Radial Progress

    Radial Progress

    6

More in Buttons

View all
  • Button

    Button

    20
  • Button

    Button

    3
  • Button Group

    Button Group

    18
  • Button

    Button

    149
  • Icon Label Subtext Button

    Icon Label Subtext Button

    69
  • Button

    Button

    9
  • Button

    Button

    37
  • Texture Button

    Texture Button

    113