Text✨ Premium

Shadow Pop

Stacked step-shadow that grows on hover and pushes the text forward — pure CSS 3D effect, no JavaScript.

CSSHover3D

You'll get access to the interactive demo with a free account.

This effect is part of Effect.Labs — 811 vanilla effects, some free, some premium. Text has 56 effects, including 4 free. Explore the category →

3 usage examples

Typographic hero title — Agency or portfolio — Shadow Pop example 1

① Typographic hero title — Agency or portfolio

WhenOn the hero section of a design website, creative agency, or personal portfolio where the main headline needs to make an impression on the first hover.
WhyA large-format title (clamp 56–80 px) gives the shadow offsets room to breathe across several pixels. The 4 px shift is immediately perceptible and conveys quality without gimmicky animation.
SettingsShadow color: #a855f7 (violet), 8 layers on hover, font-size: clamp(3.5rem, 8vw, 5rem), font-weight: 900.
Navigation links — Creative menu bar — Shadow Pop example 2

② Navigation links — Creative menu bar

WhenIn a navbar or horizontal menu where each link needs to signal hover distinctly without a classic icon or underline.
WhyAt standard nav size (15–18 px), 3 rest-state layers give a clear hovered indicator. The effect snaps off as soon as the mouse leaves the link — clean rollout guaranteed by the CSS transition.
SettingsShadow color: #f59e0b (amber), 3 layers at rest, 6 on hover, transition: 0.2s for a snappier nav response.
Pricing page — Plan name on hover — Shadow Pop example 3

③ Pricing page — Plan name on hover

WhenIn a pricing table where each column maps to a plan (Starter, Pro, Team), hovering the plan name triggers the shadow pop. The 3D effect immediately signals interactivity and draws the eye to the plan you want to highlight.
WhyThe 4 px lift combined with 8 shadow layers delivers strong visual feedback on a natively clickable element (column header or plan title). Emerald shadow on the recommended plan and indigo on the others creates a chromatic hierarchy that guides the purchase decision — all in pure CSS.
SettingsRecommended plan: shadow color #10b981 (emerald), 4 layers at rest, 8 on hover. Other plans: #6366f1 (indigo, default). font-size: 22px, font-weight: 800, transition: .3s.

How it works

The effect relies on multi-layer text-shadow: at rest, four identically colored shadows (#6366f1) are stacked at increasing offsets (1 px, 2 px, 3 px, 4 px) in the same bottom-right direction. The continuous stacking creates the illusion of a solid depth block behind the text.

On hover, two mechanisms act in parallel. transform: translate(-4px, -4px) moves the text diagonally top-left — the exact opposite of the shadow direction — simulating a lift out of the plane. Simultaneously, the :hover rule extends the shadows to eight layers (1 px to 8 px): perceived depth doubles, reinforcing the illusion that the text has been pulled out of the page.

The transition: .3s on the element animates both the text-shadow change and the translation in a single short declaration — browsers interpolate each individual shadow offset and the transform in parallel. Zero JavaScript, zero dependencies: the effect fits in two CSS rules.

Accessibility

  • prefers-reduced-motion: absent from the provided code. For motion-sensitive contexts add @media (prefers-reduced-motion: reduce) { .text-shadow-pop { transition: none; } .text-shadow-pop:hover { transform: none; } } to respect system preferences.
  • The effect is purely decorative: no ARIA attributes are required on the text element. If the text is a link or button, role and aria-label stay on the native interactive element.
  • Keyboard: the effect only activates on CSS :hover — keyboard-navigating users will not see the 3D transition. To also enable it on focus, add .text-shadow-pop:focus-visible { transform: translate(-4px,-4px); text-shadow: /* 8 layers */; }.
  • Contrast: the code defines no background. Text color #fff and shadow #6366f1 pass WCAG AA on dark backgrounds (≥ #1c1c1c). On light backgrounds, choose a contrasting shadow color and adjust color.
  • No automatic animation: the effect only triggers on user hover — it implicitly satisfies WCAG 2.3.1 (no flash) and 2.2.2 (no looping animation to stop).

Browser compatibility

Relies on text-shadow, transform, and transition — supported in all modern browsers without vendor prefixes.

Chrome 36+✓ Full
Firefox 36+✓ Full
Safari 9+✓ Full
Edge 16+✓ Full
Mobile iOS✓ Full
Android Chrome✓ Full

Without <code>transform</code> (IE 8 and earlier), text stays in its default position with 4 static rest-state shadows — the 3D lift is not visible but content remains readable with no JS errors.

The code

HTML structure to paste into your page (CSS + JS available with a premium account):

index.html — structure
<span class="text-shadow-pop">Your text</span>

<!-- On a heading -->
<h1 class="text-shadow-pop">Hero title</h1>

<!-- In navigation -->
<nav>
  <a class="text-shadow-pop" href="#">Home</a>
  <a class="text-shadow-pop" href="#">Services</a>
  <a class="text-shadow-pop" href="#">Contact</a>
</nav>

<!-- On a pull quote -->
<blockquote class="text-shadow-pop">
  "Memorable quote"
</blockquote>
🔒 Unlock the full code — from €2.99 the first month

Full HTML + CSS + JS, copy-paste ready — with hundreds of premium effects.

Customize

Options passed to the API or data-* attributes:

Option / propertyDefaultEffect
Shadow color (#6366f1) #6366f1 Hex of the shadow in all text-shadow declarations of .text-shadow-pop and .text-shadow-pop:hover. Replace with your brand color — rgba also works for a semi-transparent halo.
Rest depth (4 layers, 1–4 px) 4 shadows (1 px → 4 px) The 4 lines #6366f1 Npx Npx 0 inside .text-shadow-pop { text-shadow: … }. Drop to 2–3 layers for a subtler rest state, raise to 6 for deeper resting depth.
Hover depth (8 layers, 1–8 px) 8 shadows (1 px → 8 px) Inside .text-shadow-pop:hover { text-shadow: … }, extend or shorten the shadow list. Each extra layer adds 1 px of perceived depth.
Lift offset (translate -4px, -4px) translate(-4px, -4px) In .text-shadow-pop:hover { transform: … }. Match the absolute value to the rest-state shadow depth (4 px here). Scale proportionally if you add more shadow layers.
Transition duration (0.3s) 0.3s The transition: .3s property on .text-shadow-pop. Drop to 0.15s for snappy nav links, raise to 0.5s for a more cinematic feel.
Text color (color: #fff) #fff In .text-shadow-pop { color: #fff; }. On light backgrounds, choose a dark color and verify the shadow still reads as depth (contrast ratio ≥ 4.5:1 between text and background).

FAQ

text-shadow applies per line independently. transform moves the entire block as one. On a long paragraph the uniform vertical shift can feel heavy — prefer the effect on short titles (1–3 words) or isolated links for the best result.
Yes: define one color in .text-shadow-pop { text-shadow: … } and another in .text-shadow-pop:hover { text-shadow: … }. The transition will interpolate the hex or rgba value between the two states — useful for a tint shift that accompanies the depth change.
Yes, add background: linear-gradient(…); -webkit-background-clip: text; -webkit-text-fill-color: transparent; to .text-shadow-pop. The shadow continues to render beneath the gradient text and the transition remains functional. Test on Safari: text-shadow transition interpolation can vary when -webkit-text-fill-color is active.