micka_design

Switch

Forms

About

A fluid animated switch with draggable thumb, smooth pill morphing on hover/press, and accessible keyboard support.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Switch to your project and fits it to your theme.

Code

How Switch is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import { Switch } from "../components/ui/switch";

export default function SwitchDisabledDemo() {
  return (
    <div className="flex items-center justify-center min-h-screen bg-background">
      <div className="transform scale-150 flex flex-col">
        <Switch label="Off (disabled)" checked={false} onToggle={() => {}} disabled />
        <Switch label="On (disabled)" checked={true} onToggle={() => {}} disabled />
      </div>
    </div>
  );
}

Dependencies

More by micka_design

View all
  • Select

    Select

    84
  • Checkbox Group

    Checkbox Group

    77
  • Table

    Table

    38
  • Accordion

    Accordion

    38
  • Segmented Tabs

    Segmented Tabs

    37
  • Slider

    Slider

    24
  • Tabs Subtle

    Tabs Subtle

    22
  • Badge

    Badge

    18

More in Forms

View all
  • Premium Auth

    Premium Auth

    500
  • Login 1

    Login 1

    52
  • Book A Demo 3

    Book A Demo 3

    83
  • Authentication Card

    Authentication Card

    47
  • Contact Card

    Contact Card

    1K
  • Login Card

    Login Card

    32
  • Book A Demo 1

    Book A Demo 1

    69
  • Login 2

    Login 2

    7