← Illustrations

Bouncing Screensaver Logo

A logo drifts diagonally across a dark screen like an old DVD player left idle. It bounces off each edge and changes colour every time it hits one. Catch it landing exactly in a corner and the screen flashes.

How to use it

  1. Paste the snippet just before </head>.
  2. Add an empty <div data-bouncing-screensaver-logo> for the built-in disc logo, or put your own logo inside it.
  3. For your own logo, an <svg> that uses currentColor picks up each new colour.

Options

Add any of these attributes to the same element.

data-textWord on the built-in logo. Default LOGO.
data-speedHow fast it drifts, in pixels a second. Default 90.
data-sizeLogo width as a fraction of the screen. Default 0.24.
data-colorsComma-separated colours to cycle through. Default seven bright colours.

It is 8:5 with a near-black background by default; set your own height or background on the element to change that. It pauses when off screen. With reduced motion the logo stays put.

1 · Snippet
2 · Your HTML