Component · Toggles

Day and night toggle with a changing scene

by Informeek Studio 15 November 2026
Live Flip the switch to night

The prompt

Build a day and night toggle inside a booking card for a lakeside campsite called Fernwhistle Camp. A 420px card with 28px corners holds a 400 by 230 SVG scene: a blue sky gradient (#7cc6ef to #e3f5ff) with a sun (#ffd84a) and two drifting clouds, hills, a willow, pines, a lake with ripples, a cream bell tent (#f1e4c8) with a flag, a small camp fire and a red kayak. Below it: an eyebrow, "Pitch 7, a bell tent for two at the water's edge", one line of copy and a "Night view" row with a 112 by 52px switch. Its track is sky blue with clouds and its knob is a glowing sun. Flipping it slides the knob 60px with a springy cubic-bezier(.5,1.6,.45,1) while it rolls 200deg into a cratered moon, the track fades to navy and stars replace the clouds. At the same moment, over 0.9s, the scene goes to night: a navy sky (#0c1533), the sun sets, a crescent moon rises, stars twinkle, the hills and trees darken, the tent glows from inside, the fire flickers, a lantern lights and fireflies drift. The card and page turn dark and the copy crossfades to a night message. Use role switch, start in night if the system prefers dark, fit 390 by 504 on phones and switch instantly for reduced motion.

Written by Informeek Studio to recreate this design. Prompts are not deterministic, so running it again gives a similar result, not an identical one.

Use it in three steps

  1. Copy the prompt with the button above.
  2. Paste it into your AI site builder, or any AI chat that writes code.
  3. Make it yours by drawing your own place into the scene behind the switch.

About this day night toggle

A plain dark mode switch tells people the colours will change. This day night toggle shows them. The switch is a little sky of its own, a sun on a blue track with two clouds, and the card above it holds a drawn picture of a campsite by a lake. Flip it and the sun rolls across, turns into a moon with craters and the clouds sink away as stars come out.

The picture follows in the same breath. The sun sets behind the hills while a crescent moon rises, the trees go dark, the tent lights up from inside, a lantern and the camp fire start to flicker and fireflies wander near the willow. The card, the page and the message under the title all switch too, from kayaks in the morning to quiet hours at night. It opens in night mode for anyone whose phone is already set to dark.

Why the prompt works

  • It designs the switch as a scene, sun, moon, clouds and stars.
  • It lists what changes at night, item by item, so nothing is left in daylight.
  • It gives one shared timing, 0.9 seconds, so it all moves together.
  • It respects the visitor, with the system setting and reduced motion.

Where to use it

Holiday lets, campsites, hotels, games, children’s apps and any site whose dark theme deserves a little story.

The prompt is shared under CC BY 4.0. Reuse it freely, including commercially, with a credit linking back to this page.

Keep exploring

More prompts like this

See the collection →
Live
Component · Toggles

Tactile lever toggle switches

Live
Component · Cursor effects

Brushed velvet line animation

Live
Component · Interactive components

Bouncing balls animation for dog toys