forever components

Bauhaus Geometric

Color Blocks Slide

Six primary-color blocks slide between anchors on a 4x4 modular grid over off-white paper; a roving circle and static triangle add Bauhaus accent marks.

canvasmedium complexitymoderate motion

Open on the canvas to copy the code → Free account · 3 copies a day · membership goes unlimited

Live demo — the real component, running in a sandbox. One self-contained HTML file, zero dependencies. Open it on the canvas →
Worth keeping? Votes steer what gets built next — sign in to cast one, free to read

When to use it

Art/design-themed hero sections, Bauhaus or modernist aesthetic pages, ambient gallery backgrounds.

When not to

Contexts requiring legible text overlays — sliding blocks compete visually. Light-background pages since background is hardcoded dark (#101012 outer stage).

Working with an AI agent

Every component ships agent-ready metadata. An example instruction for this one:

Change the cycle duration from 4200ms to 6000ms by editing the division in `var time=(ts-start)/4200`, and swap the primary palette to muted earth tones by updating RED, BLU, YEL constants. Theme: dark tokens live in :root, the light variant in :root[data-theme="light"]; ?theme=light or a {type:'forever:theme'} postMessage switches at runtime.

Safe to edit

  • color palette (RED, BLU, YEL, INK, PAP constants)
  • cycle speed (divisor 4200 in time calc)
  • grid cell size (GRID=4 and 0.84 margin factor)
  • block positions/anchors (ax/ay/bx/by in B array)
  • per-block speed factors (s field in B array)
  • roving circle travel speed (ease arg 0.6)
  • theme tokens (:root dark defaults + [data-theme=light] overrides)

Keep intact

  • DPR-aware canvas sizing and setTransform call
  • IIFE wrapper
  • visibilitychange stop/play guard
  • reduced-motion static fallback (drawFrame(0.5))
  • theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)

Known limitations

  • Outer stage background hardcoded to #101012 — changing PAP paper color without matching outer bg creates a framed-box look
  • No aria live region; reduced-motion users see a single static mid-slide frame, not a settled composition

bauhausgeometriccolor-blocksgridcanvasloopcomposition

More Bauhaus Geometric components

  • Grid Construction16 primary-colored geometric shapes scatter then snap into a 4x4 modular grid, hold, dissolve, and recompose in a new Bauhaus arrangement.
  • Orbiting ArcsConcentric red, blue, and yellow arcs counter-rotate around a breathing core; scattered dots and a tilted segmented bar orbit in abstract Bauhaus style.
  • Form TrioRed circle, blue square, and yellow triangle orbit a slow-rotating armature while each shape independently spins, pulses, or tilts on a dark field.
  • Mobile BalanceA Calder-style kinetic mobile of Bauhaus primary-colored circles, squares, and triangles hang from swaying black balance arms in slow counterpoint.
  • Dot Rhythm8x8 grid of red, blue, yellow, and white dots pulsing in diagonal travelling waves; two interfering sines modulate scale and opacity for a rhythmic beat.
  • Diagonal CounterpointRed and blue diagonal bars sweep in opposing directions and cross at center; a pulsing yellow square node and slow-spinning dashed ring anchor the…