Type Specimen Hero
A magazine-cover hero where the photograph inverts through the letterforms, pinned to its own stacking context.
DOM + CSS0 deps1 file · 4 KB TSX
Props
"use client";
/**
* A type specimen hero: the photograph shows THROUGH the letterforms, inverted.
*
* The effect is one CSS property and one property that everybody forgets.
*/
/** Three plates ship with the component so it is useful before you have art. */
const PLATES: Record<string, string> = {
street: "https://images.unsplash.com/photo-1532332248682-206cc786359f?auto=format&fit=crop&w=1400&q=70",
model: "https://images.unsplash.com/photo-1668952135120-7d997b1b3778?auto=format&fit=crop&w=1400&q=70",
texture: "https://images.unsplash.com/photo-1579492450119-80542d516179?auto=format&fit=crop&w=1400&q=70",
};
export function TypeSpecimenHero({
headline = "NOCTURNE",
kicker = "Spring / Summer",
meta = ["Issue 04", "72 pages", "Edition of 500"],
// ---------------------------------------------------------------
// Full source available with a viberdy Pro subscription.
// https://viberdy.dev/pricing
// ---------------------------------------------------------------
}Details
About this heroe
The inverted-headline cover is a familiar piece of art direction and a surprisingly fragile one to implement, because a blend mode does not composite against the element you can see behind it — it composites against the nearest ancestor that forms a stacking context. Left alone, that is usually the page itself, so the headline inverts against the body background, shifts as the section scrolls past other content, and looks different on every page the component is dropped into. A single isolation property pins the blend to the hero and turns a one-page effect into a component. Three details finish it. The type is pure white, because difference inverts the backdrop exactly at maximum and anything less returns a muddy partial inversion that reads as a mistake. The blended element is the text alone rather than a full-bleed overlay, since a blend mode promotes its subtree to its own composited layer and a viewport-sized one costs real memory on a phone. And forced-colors mode drops blend modes entirely, which would leave white text on a white canvas — so the headline carries an explicit normal-blend, CanvasText fallback. The plate underneath is desaturated and multiplied rather than covered with a flat scrim, which keeps the photograph's own tonality instead of fogging it evenly.
Curator’s note
Without isolation: isolate the headline blends against the page, not the hero — so it looks different everywhere you paste it.

