Line shadow text
Also called striped shadow text, line shadow, or animated stripe shadow
Bold display text with an offset shadow made of thin diagonal stripes that slide continuously, for a retro print look with a little motion.
import { motion, useReducedMotion } from 'motion/react';
// Two thin lines per square tile. At 45° the pattern repeats every half
// diagonal, so the tiles join seamlessly.
const STRIPES =
'linear-gradient(135deg, #2563eb 0 16%, transparent 16% 50%, #2563eb 50% 66%, transparent 66%)';
const TILE = '0.075em'; // in em, so the stripes scale with the type
export function LineShadowHeading({ children }: { children: string }) {
const reduceMotion = useReducedMotion();
return (
<h1 className='relative text-8xl leading-none font-black tracking-tighter'>
{/* The shadow: an offset copy filled with stripes, hidden from screen readers. */}
<motion.span
aria-hidden
className='absolute inset-0 translate-[0.06em] bg-clip-text text-transparent select-none'
style={{ backgroundImage: STRIPES, backgroundSize: `${TILE} ${TILE}` }}
// Sliding exactly one tile width loops with no visible jump.
animate={
reduceMotion
? undefined
: { backgroundPosition: ['0em 0em', `${TILE} 0em`] }
}
transition={{ duration: 0.7, ease: 'linear', repeat: Infinity }}
>
{children}
</motion.span>
<span className='relative'>{children}</span>
</h1>
);
}Give the "Go live." poster headline a line shadow: set the word at 120px in a black weight, and behind it render an aria-hidden copy offset 0.06em down and right, filled with 45-degree blue stripes (lines about 2px thick every 7px) from a small linear-gradient tile clipped with background-clip: text. Slide the tile one tile width every 0.7 seconds on a linear loop, size the offset and tile in em, and keep the stripes still when prefers-reduced-motion is set.
Paste into Layerwise or any AI coding tool.
What is Line shadow text?
Line shadow text pairs a heavy headline with a copy of itself shifted down and to the right. The copy is filled with thin diagonal stripes: a small linear-gradient tile, clipped to the letters with background-clip: text. Sliding the tile by exactly one tile width on a loop makes the stripes crawl with no visible jump.
It suits posters, launch pages, event banners, and sports or editorial headlines that want a printed, retro feel. It needs big, heavy type, about 64px or larger in a black or extra-bold weight, so the stripes have room to show beside the letters.
Size the offset and the stripe tile in em, so they scale with the headline. Render the shadow as an aria-hidden copy behind the real text, so screen readers hear the word once. Animating background-position repaints only the shadow, which is fine for a headline. Stop the slide when someone prefers reduced motion; the still stripes keep the look.
Often confused with
- Drop shadow
- A drop shadow is a soft, blurred copy of a shape's outline. A line shadow is a hard-edged copy filled with moving stripes.
Related terms
All termsDrop shadow
A shadow cast behind an element to make it look raised off the page, with larger, softer shadows signaling higher elevation.
Neo-brutalism
A bold UI style with thick black borders, hard offset shadows, flat bright colors, and chunky type that looks raw on purpose.
Comic text
Pop-art lettering in the style of comic books: heavy outlined capitals, a hard offset shadow, halftone dots, and a punchy pop-in entrance.
Gradient text
Text filled with a color gradient instead of a solid color, made by painting a gradient background and clipping it to the shape of the letters.
Build it with Layerwise
Describe your app, watch it run in a live preview, and publish it with a database, storage, and sign-in built in.