Bundui.io

Sliding Icon Theme Switch

Component 36

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

    832
  • Floating paths

    Floating paths

    704
  • Text Gradient Scroll

    Text Gradient Scroll

    643
  • Stars

    Stars

    560
  • Image Comparison

    Image Comparison

    429
  • Magnetic Button

    Magnetic Button

    409
  • Marquee Effect

    Marquee Effect

    339
  • Wavy

    Wavy

    219

Explore more

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