Zachary BENSALEM

Toggle Switch Glass

Forms 75

About

A glass-style toggle switch with smooth, tactile animations and light/dark mode support.

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

Code

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

Usage.tsx

import ToggleSwitch from "../components/ui/toggle-switch-glass";

function DemoBackground({ children }: { children: React.ReactNode }) {
  return (
    <div className="flex min-h-screen w-full items-center justify-center bg-[#F3F3F3] dark:bg-[#414141]">
      {children}
    </div>
  );
}

export default function DemoOne() {
  return (
    <DemoBackground>
      <ToggleSwitch size="lg" />
    </DemoBackground>
  );
}

Dependencies

More by Zachary BENSALEM

View all
  • Animated Loading SVG + Text Shimmer

    Animated Loading SVG + Text Shimmer

    371
  • Prompt Input dynamic grow

    Prompt Input dynamic grow

    361
  • Copy Button - Variants

    Copy Button - Variants

    58
  • Sign In Minimalist

    Sign In Minimalist

    2
  • SegmentedControl

    SegmentedControl

  • Dropdown Menu - Apps SDK UI

    Dropdown Menu - Apps SDK UI

More in Forms

View all
  • Premium Auth

    Premium Auth

    496
  • Authentication Card

    Authentication Card

    44
  • Login 1

    Login 1

    52
  • Login 2

    Login 2

    7
  • Form

    Form

    32
  • Card Studio

    Card Studio

    41
  • Form

    Form

    136
  • Login Card

    Login Card

    32