Headline Shadow Extrusion
Layered colored shadows extend behind headline letters to create a stacked-paper look.
Layered colored shadows extend behind headline letters to create a stacked-paper look.
Live Demo
Hover over the element or use Tab to focus.
Source Code
Copy the HTML, CSS or JavaScript you need for your project.
<a href="#story" class="tbx-1159"><span class="tbx-1159__label">THE NEW CHAPTER</span><span class="tbx-1159__type" data-word="Beyond">Beyond</span><span class="tbx-1159__sub">Discover what's next ↗</span></a>
.tbx-1159{box-sizing:border-box;display:flex;flex-direction:column;align-items:flex-start;gap:5px;padding:21px 19px 18px;width:264px;max-width:100%;background:#f8f0e7;color:#26364b;border-radius:8px;border:1px solid #eadbc9;text-decoration:none;overflow:hidden}.tbx-1159__label{font:800 9px/1.3 system-ui,sans-serif;letter-spacing:.18em;color:#8a655b}.tbx-1159__type{font:900 clamp(39px,13vw,52px)/1 Georgia,serif;position:relative;display:block;isolation:isolate;transition:transform .4s cubic-bezier(.25,.8,.2,1)}.tbx-1159__type::before,.tbx-1159__type::after{content:attr(data-word);position:absolute;inset:0;z-index:-1;opacity:0;transition:transform .4s cubic-bezier(.25,.8,.2,1),opacity .25s}.tbx-1159__type::before{color:#e39e8e;transform:translate(0,0)}.tbx-1159__type::after{color:#9dbab1;z-index:-2;transform:translate(0,0)}.tbx-1159__sub{margin-top:8px;font:650 11px/1.3 system-ui,sans-serif;border-bottom:1px solid currentColor;padding-bottom:3px}.tbx-1159:is(:hover,:focus-visible) .tbx-1159__type{transform:translate(-5px,-5px)}.tbx-1159:is(:hover,:focus-visible) .tbx-1159__type::before{transform:translate(5px,5px);opacity:1}.tbx-1159:is(:hover,:focus-visible) .tbx-1159__type::after{transform:translate(10px,10px);opacity:1}.tbx-1159:focus-visible{outline:3px solid #9e5447;outline-offset:3px}
@media (prefers-reduced-motion: reduce) {.tbx-1159, .tbx-1159 *, .tbx-1159::before, .tbx-1159::after, .tbx-1159 *::before, .tbx-1159 *::after {animation-duration:.01ms !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}
How to Use
Insert the HTML and add the CSS to your stylesheet. Adjust colors and sizes and avoid class conflicts.
Use Case
Useful for hero sections and typography sections.
Technical Notes
Keep controls usable on touch devices. Test keyboard focus and reduced-motion preferences.
Mobile: Ensure the interactive content remains accessible without hover on touch devices.
Browser: Uses modern CSS. Check behavior in the browsers you support.
Reduced Motion: Check that prefers-reduced-motion is respected.