Three CSS layers clipped to text build holographic foil: iridescent rainbow gradient, metal grain, looping specular sweep. Hover speeds up the shimmer.
CSSTypographyHoverHolographic
FOIL✦ PRO
Hover or click the scene to interact
This effect is free — the Cards category contains 41 effects total, including 6 free. Effect.Labs has 811 vanilla effects. Explore the category →
① Poster or credits — Film, album, or premium event title
WhenThe hero of a cinema, music, or fashion landing page where the main title must make a visual statement at first glance.
WhyAt large glyph sizes (4–6 rem), the specular sweep travels the full width of each letter and the rainbow iridescent becomes fully legible — the effect only reveals its richness on large text.
Settingsfont-size: 5rem, font-weight: 900, letter-spacing: 0.06em, background #000, --fsh-speed: 4.5s for a slow cinematic rhythm.
🏆
② Tier badge — "PRO" label on a pricing card
WhenPricing page or feature comparison table: the foil-border badge identifies the premium plan at a glance without a background color that might clash with the surrounding UI.
WhyThe pill variant (.fsh-pill) fits in 2 px of padding and border-radius: 20px — perfect for a compact badge (≈ 70 × 28 px) that does not compete with a CTA.
Settingsfont-size: 0.85rem, letter-spacing: 0.1em, .fsh-inner { background: #0f0c22 } to match the premium card background.
🚀
③ Luxury e-commerce hero — "Limited Edition" or collection launch title
WhenThe hero block of a capsule product page, collaboration, or limited drop where scarcity must be communicated before the user scrolls.
WhyThe metallic grain combined with gold–cyan–purple iridescent evokes physical hot-stamp foil that neither text-shadow nor a static image can replicate. The slow shimmer reinforces the luxury perception.
Settingsfont-size: 4rem, --fsh-speed: 5s (slow rhythm = sophistication), background #060610, uppercase text with letter-spacing: 0.08em.
How it works
The effect stacks three background-image layers on .fsh-text, all anchored to glyph shapes via background-clip: text and -webkit-text-fill-color: transparent. This replaces the text color with a background rendered inside the letter outlines — no canvas, no SVG.
The third layer (normal blend) is the iridescent gradient at 135° — gold → pink → silver → cyan → purple → silver → gold — spanning 300% width. The second layer (overlay blend) is a repeating-linear-gradient at 104° of metallic micro-hatching (white at 7% and gold at 4%, every 1–4 px) simulating metallized film grain. The first layer (screen blend) is the specular sweep: a translucent white bevel at 108° that travels across the text to produce the hot-stamp glint.
The fsh-pan animation translates background-position in an infinite linear loop across the iridescent gradient and the sweep, creating the illusion of light moving across a foil surface. Duration is controlled by the CSS variable --fsh-speed (default 3.2s), overridden to 0.7s on hover of .fsh-foil.
The pill variant adds a foil border via a linear-gradient background on .fsh-pill (2 px padding, border-radius: 20px), animated by fsh-pan-border. The inner .fsh-inner carries a dark background that exposes only the animated border.
Accessibility
prefers-reduced-motion is not handled in the provided code — the animation runs regardless of system preferences. Add @media (prefers-reduced-motion: reduce) { .fsh-text { animation: none; } } for motion-sensitive audiences.
Text stays in the normal DOM flow (<span>): screen readers parse the content without accessing the CSS background.
-webkit-text-fill-color: transparent cancels the browser's fallback text color. If background-clip: text is unsupported, text becomes invisible. Add color: gold (or any readable color) on .fsh-text as an explicit fallback.
The effect is purely decorative and acts only on hover speed — no information is conveyed by that state alone. Suitable for large headings, not functional text.
Contrast: on a very dark background (#000), the gold and white iridescent tones locally exceed 4.5:1, but WCAG measurement of animated multi-color text is complex. Reserve for large headings (≥ 1.5rem), never body copy.
Browser compatibility
Requires background-clip: text and background-blend-mode — supported in all modern browsers since 2016–2018. Zero JS, zero dependencies.
Chrome 63+✓ Full
Firefox 59+✓ Full
Safari 8+✓ Full
Edge 79+✓ Full
Mobile iOS✓ Full
Android Chrome✓ Full
Without background-clip: text, the gradient renders as a background behind the text (opaque colored text). Define color on .fsh-text to keep the text readable in that case.
The code
Copy the three blocks into your page. No dependencies.
The fsh-pan animation is missing from the code — how do I add it?
The @keyframes fsh-pan rule is absent from the provided snippet. Add it to your CSS: @keyframes fsh-pan { 0% { background-position: -120% 0, 0 0, 0% 50%; } 100% { background-position: 220% 0, 0 0, 300% 50%; } }. Without it, the shimmer stays static but the base foil look remains visible.
Can the effect be applied to any typeface?
Yes — but grain and iridescent are only clearly legible on wide glyphs. Prefer bold (700–900) or condensed serif fonts. Thin typefaces show only a fine iridescent line. Optimal results at 3 rem and font-weight: 900.
Does the effect work without JavaScript?
Yes — Foil Shimmer is 100% CSS. No JS is required for the shimmer or the animated foil border on the pill variant. It integrates directly into a static template, a CMS, or an HTML email that supports CSS animations.