Skip to content

No.561 · Backgrounds· New

Prism Glass Pane

A hero-sized white background whose edges are a slab of clear glass. The face is plain white; only the border is designed, a polished rim that splits ink into colours at two opposite corners. Animated, the two fringes travel round the edge of the hero.

The prompt

Copy this text

Automatic copying is unavailable. Copy the selected text using your device’s copy command.

Written for the variant you picked above: Spectrum · still

Build a hero-sized background that is plain white, with only its edges designed: the border of the hero is the thick polished edge of a slab of clear glass. There is no text in it; an optional slot sits above the white face. Layout. A full-bleed section at least 560px tall, filled with pure white (#ffffff). One glass pane covers it, set in from every side by clamp(10px, 1.4vw, 18px), so a narrow band of white shows between the glass and the hero's edge and the pane's rounded corners are visible. For the pane: corner radius 11% of its short side (at most 64px), rim width 2.2% of the short side (between 8 and 14px), lens depth 14% of the short side (at most 92px). One canvas, light glass only, and no shadow: the page around it is the same white. One lap of the fringes takes 9 seconds by default. The glass. Draw it with one WebGL fragment shader on a canvas that is larger than the element by a margin, so the shadow and outer shell can sit outside the edge; output premultiplied alpha and leave the face fully transparent, so the slab works on any ground. Use a rounded-box signed distance d (negative inside). Rim: a flat band of the stated width just inside the edge, tinted white at 10% on light glass and 3% on dark, bounded by two fine lines (the outer edge and an inner bevel) that are brighter on the side facing a light from the top left. Light glass adds a soft shadow below it (black, 13%, falling off over a fifth of the lens depth). Dark glass adds instead a second, fainter outline outside the first, visible only on the left and right flanks. The fringes. Keep a unit "lean" direction, at rest pointing to the top right, so the lens favours the top-right and bottom-left corners. For each pixel take its position within the corner region (0 at the middle of an edge, 1 at the corner, per axis, signed), normalise it, and let w = smoothstep(0.76, 1, |dot(that, lean)|): 1 where the edge faces along the lean, falling to 0 away from it. The fringe is as thick as w^1.7 × the lens depth, varied by ±14% with a slow sine along the edge so it never reads as a ruled band. Across that thickness, s runs 0 at the outer edge to 1 at the inner side: colour is a four-stop gradient read from the outer stop at s = 0 to the inner stop at s = 1; a solid core of ink (near-black on light glass, near-white on dark) covers s 0.16–0.68 with soft ends, and only where the fringe is thick, so the thin tails are colour alone; opacity fades from s = 0.5 to 1. The result is one colour hugging the outer edge, a solid core, and a second colour bleeding softly into the face, tapering to a point along each edge. Motion. The only animation is the fringes travelling round the rim: rotate the lean direction at a constant rate, one full turn per lap, advancing by elapsed time (capped at 50ms a frame) so the pace is the same at any frame rate. Because the lens favours both ends of the lean, there are always two fringes, opposite each other, and they slide along the edges and round the corners together. Nothing follows the pointer and nothing eases or pulses. With motion set to "still", or under reduced motion, draw one frame with the fringes at the top-right and bottom-left corners and never animate. Edge lines. With lines set to "outer" only the outer edge line (and its highlight) is drawn; the rim band and inner bevel are left out. With lines set to "none" the slab is drawn exactly the same except that the edge lines are left out: no rim band, no outer edge line, no inner bevel, no highlight lines along the edge and, on dark glass, no outer shell line. The fringes, their colours and motion, the shadow and the soft glow are unchanged. Production behaviour: the glass is decorative and hidden from assistive technology, and it does not react to the pointer. Pause off screen and in hidden tabs; cap the device pixel ratio at 2. Without WebGL show the edge as a plain hairline frame. Selected variant — Spectrum · still (spectrum-still): Fringe colours are the reference colours: cyan #3fd8ff innermost, deep blue #1a34ff, magenta #ff2aa0, and red #ff4530 against the outer edge. This version does not move at all: the fringes rest at the top-right and bottom-left corners. The glass is set in from the hero's edge by the small white band. Select it with palette "spectrum" and motion "still". This selection takes precedence over references to other themes or options in the general brief. Implement this selected appearance; do not add a variant picker or alternative appearances unless requested. Implementation requirements: Use React and TypeScript. Keep the component self-contained, with uniquely scoped CSS and no animation libraries. Include required imports, styles and font setup in the result. Interaction: None: the background does not react to the pointer. Motion: Two fringes travel round the edge of the hero at a constant pace, one lap in nine seconds. Accessibility: Decorative and aria-hidden; the face is plain white, so content placed above it keeps full contrast. Reduced motion draws one still frame. Responsive behavior: The inset and every proportion of the glass follow the section's size, down to a phone. Touch: Nothing to touch. Preserve keyboard access, visible focus and reduced-motion behavior. Keep fictional demo data and simulated service calls in a separate usage example; expose callbacks for real actions and recover from rejected requests. Keep usage-example links inside the demo: use local buttons or prevent navigation. Demonstration links must not navigate to Vitrine routes or open other pages; preserve real URL support in the reusable component itself. Verify the result at narrow and wide viewport sizes, with keyboard input and reduced motion enabled.

Notes

Interaction
None: the background does not react to the pointer.
Motion
Two fringes travel round the edge of the hero at a constant pace, one lap in nine seconds.
Accessibility
Decorative and aria-hidden; the face is plain white, so content placed above it keeps full contrast. Reduced motion draws one still frame.
Responsive
The inset and every proportion of the glass follow the section's size, down to a phone.
On touch
Nothing to touch.