Zachary BENSALEM

Toggle Switch Glass

Buttons 16

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 LargeDemo() {
  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 Buttons

View all
  • Button

    Button

    14
  • Button

    Button

    34
  • Texture Button

    Texture Button

    92
  • Button Save

    Button Save

    46
  • Button

    Button

    64
  • Button Group

    Button Group

    3
  • App Store Button

    App Store Button

    454
  • Notification Button

    Notification Button

    103