Effects · block · 45K

Screensaver

A page screensaver with three original 1-bit modules: Floppy Flock (3.5" disks flocking with flapping shutters), Night Shift (drifting coffee mugs whose steam spells a word) and Cable Garden (cables and plugs growing like vines). Lazy-loaded modules, crisp integer-scaled canvas, hot corners, and a provider with start/stop for Test buttons.

Never starts while a video plays, while focus is in a text field or while the tab is hidden, and pauses drawing when hidden. A key, a click or a deliberate mouse move wakes it; the waking click is swallowed. The overlay is aria-hidden and never takes focus. Under prefers-reduced-motion it stays off, or shows a still dimmed pattern with reducedMotion="static". Write your own module with the { title, setup(ctx, w, h, rng), frame(dt), dispose() } contract in lib/screensavers/types.ts and pass { title, load: () => import(…) } as module.

Install

pnpm dlx shadcn@latest add @s7ui/screensaver

Example

This example also uses @s7ui/button @s7ui/screensaver-panel.

In this demo it also starts after 15 seconds without input, or when the pointer rests in the bottom-right corner for a second. Move the mouse, press a key or click to wake it; that click does nothing else.

Screensaver

Module

Woken 0 times.

Info

Files:
components/retro/screensaver.tsx, lib/screensavers/index.ts, lib/screensavers/types.ts, lib/screensavers/sprite.ts, lib/screensavers/floppy-flock.ts, lib/screensavers/night-shift.ts, lib/screensavers/cable-garden.ts
Uses:
@s7ui/theme, @s7ui/use-idle
Packages:
—