Code · Claude Opus 5.5
Day and night toggle
Day and night toggle: one chunky 3D toggle switch built in Three.js, centred on the screen like a premium UI component. The track is a rounded capsule of frosted glass with a thin bright rim. Inside it, a small glowing sun sits on the left. Clicking or tapping the switch rolls the knob to the right with a springy, satisfying ease (about 0.8 s), and the sun turns into a crescent moon as it rolls. At the same time the scene shifts from day to night: a soft blue sky gradient with a few slow, puffy low-poly clouds drifting inside the track becomes deep navy with small twinkling stars, and the clouds fade out. Clicking again goes back to day. The lighting follows: a warm key light by day, cool moonlight with a soft glow at night. The page background behind the switch changes colour with it. Feel: the switch tilts a few degrees toward the pointer on hover, presses down slightly on click, and sits on a soft contact shadow. Materials: a glossy knob, frosted transmissive glass for the track, an emissive sun and moon. Keep it minimal. No text except a tiny uppercase label under the switch that reads DAY or NIGHT. Fit any screen size, render crisp on retina (pixel ratio up to 2), toggle with Space or Enter for keyboard users, and respect prefers-reduced-motion.
- Model
- Claude Opus 5.5
- Made by
- Samnang Aing
- Shared
- Likes
- 0
Use its prompt, turn it into a video or a 3D model, or find more like it in Fil. Fil is invite-only for now: without an invitation, Open in Fil shows the waitlist.