micka_design

Switch

Forms 26

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 { useState } from "react";
import { Switch } from "../components/ui/switch";

export default function SwitchCheckedDemo() {
  const [checked, setChecked] = useState(true);
  return (
    <div className="flex items-center justify-center min-h-screen bg-background">
      <div className="transform scale-150">
        <Switch label="Enabled" checked={checked} onToggle={() => setChecked(!checked)} />
      </div>
    </div>
  );
}

Dependencies

More by micka_design

View all
  • Select

    Select

    84
  • Checkbox Group

    Checkbox Group

    77
  • Segmented Tabs

    Segmented Tabs

    40
  • Table

    Table

    39
  • Accordion

    Accordion

    38
  • Tabs Subtle

    Tabs Subtle

    24
  • Slider

    Slider

    24
  • Badge

    Badge

    18

More in Forms

View all
  • Premium Auth

    Premium Auth

    524
  • Contact Card

    Contact Card

    1K
  • Book A Demo 1

    Book A Demo 1

    73
  • Login 1

    Login 1

    53
  • Form

    Form

    137
  • Card Studio

    Card Studio

    41
  • SignInPage

    SignInPage

    667
  • Modern & Stunning sign in

    Modern & Stunning sign in

    1.6K