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

    774
  • Floating paths

    Floating paths

    650
  • Text Gradient Scroll

    Text Gradient Scroll

    620
  • Stars

    Stars

    544
  • Image Comparison

    Image Comparison

    429
  • Magnetic Button

    Magnetic Button

    404
  • Marquee Effect

    Marquee Effect

    322
  • Wavy

    Wavy

    198

Explore more

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