forever components

Stained Glass

Gothic Lancet Triptych

Three gothic lancet arches with jewel-toned panes hue-shift at independent rates; a warm light beam sweeps across and trefoils pulse overhead.

svglight 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

Dark-mode hero backgrounds, medieval/fantasy themes, decorative loading screens, or ambient art tiles requiring no interaction.

When not to

Light backgrounds (SVG has hardcoded dark fill). Contexts requiring readability — hue-shift filter animation on large groups can interfere with overlaid text.

Working with an AI agent

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

Change the centre lancet accent to rose gold by replacing fill="#d4a017" circle with fill="#e8927c", and slow the beam cycle from 4s to 8s in the #gl-beam animation rule. 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

  • lancet hue-shift durations (3s, 5s, 4s on .gl-left/.gl-centre/.gl-right)
  • hue-rotate degree values in @keyframes gl-hueL/C/R
  • beam sweep speed (gl-beam 4s linear infinite)
  • pane fill colors (e.g. #8b1a1a, #1a3a6b, #0d5c2e)
  • trefoil pulse timing (gl-trefoil 2.5s)
  • theme tokens (:root dark defaults + [data-theme=light] overrides)

Keep intact

  • clipPath ids (gl-arch-l/c/r) — clip-path references break if removed
  • IIFE wrapper with prefers-reduced-motion guard
  • linearGradient #gl-beam-grad for beam fade effect
  • theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)

Known limitations

  • visibilitychange listener is registered but empty — animation does not pause when tab is hidden
  • Background color hardcoded in both CSS and SVG rect — must change both to recolor
  • No touch or pointer interaction; purely decorative

stained-glassgothicsvghue-shiftambientdecorativelight-beam

More Stained Glass components

  • Kaleidoscope MandalaThree concentric rings of colored segments spin at different speeds; a pulsing jewel center and hue-sweep filter create a stained-glass kaleidoscope.