About
Theme Switch
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Theme Switch to your project and fits it to your theme.
Code
How Theme Switch is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import * as React from "react"
import { DayNightToggle } from "@/components/ui/theme-switch"
function Demo() {
const handleToggle = (isChecked) => {
console.log(`Switched to ${isChecked ? 'day' : 'night'} mode`);
// Update your app state here
};
return <DayNightToggle onChange={handleToggle} defaultChecked={false} />;
}
export {Demo}











