Bundui.io

Sliding Icon Theme Switch

Component 26

About

A theme toggle switch where a single sun or moon icon slides with the thumb, showing only the currently active mode.

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

Code

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

Usage.tsx

import SwitchComponent from "@/components/ui/switch8";

export default function Demo() {
  return (
    <div className="flex min-h-64 items-center justify-center">
      <SwitchComponent />
    </div>
  );
}

Dependencies

More by Bundui.io

View all
  • Fluid particles background

    Fluid particles background

    757
  • Floating paths

    Floating paths

    638
  • Text Gradient Scroll

    Text Gradient Scroll

    613
  • Stars

    Stars

    536
  • Image Comparison

    Image Comparison

    429
  • Magnetic Button

    Magnetic Button

    402
  • Marquee Effect

    Marquee Effect

    318
  • Wavy

    Wavy

    193

Explore more

Part of Bundui — browse the full library on 21st.dev.