Bundui.io

Sliding Icon Theme Switch

Component 28

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

    780
  • Floating paths

    Floating paths

    658
  • Text Gradient Scroll

    Text Gradient Scroll

    621
  • Stars

    Stars

    545
  • Image Comparison

    Image Comparison

    429
  • Magnetic Button

    Magnetic Button

    404
  • Marquee Effect

    Marquee Effect

    323
  • Wavy

    Wavy

    201

Explore more

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