Zachary BENSALEM

Toggle Switch Glass

Buttons 17

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

    373
  • Prompt Input dynamic grow

    Prompt Input dynamic grow

    362
  • 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

    5
  • Texture Button

    Texture Button

    97
  • Button Group

    Button Group

  • Eclipse Button

    Eclipse Button

    39
  • Button

    Button

    4
  • HeroUI Button Group

    HeroUI Button Group

  • Base Button

    Base Button

    4
  • App Store Button

    App Store Button

    458