Shimmer headline
A large headline with a soft band of light that sweeps across the key words, and a button with the same shimmer. Use it once, on the one phrase you want people to read. Motion draws the eye, so more than one shimmer on a page cancels itself out.
<section class="blk-section blk-shimmer" aria-labelledby="blk-shimmer-h">
<div class="blk-container">
<h2 id="blk-shimmer-h">Ideas that <span class="blk-shimmer__text">actually ship</span></h2>
<p class="blk-shimmer__lead">One short line that follows the headline and says what you do.</p>
<a class="blk-btn blk-btn--primary blk-shimmer__btn" href="#">Start a project</a>
</div>
</section>.blk-shimmer.blk-section { text-align: center; padding-block: clamp(56px, 8vw, 110px); }
.blk-shimmer h2 { font-size: clamp(2.2rem, 6vw, 4rem); }
.blk-shimmer__text { background: linear-gradient(100deg, var(--blk-accent-dark) 0%, var(--blk-accent) 35%, color-mix(in srgb, var(--blk-accent) 40%, #fff) 50%, var(--blk-accent) 65%, var(--blk-accent-dark) 100%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; animation: blk-shimmer-sweep 6s linear infinite; }
.blk-shimmer .blk-shimmer__lead { max-width: 44ch; margin: 18px auto 30px; font-size: 1.15rem; color: var(--blk-muted); }
.blk-shimmer__btn { position: relative; overflow: hidden; }
.blk-shimmer__btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-100%); animation: blk-shimmer-btn 3.5s ease-in-out infinite; }
@keyframes blk-shimmer-sweep { from { background-position: 100% 0; } to { background-position: -150% 0; } }
@keyframes blk-shimmer-btn { 0%, 55% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }How to customise it
- Wrap only the key words in blk-shimmer__text. The rest of the headline stays still.
- The sweep colour comes from --blk-accent, so a theme recolours it.
- Slow it down or speed it up by changing the animation duration (6s) in block.css.
- All motion stops when the visitor has asked their device for reduced motion, because base.css switches animations off.
Tokens it reads
--blk-accent--blk-accent-dark--blk-heading--blk-on-accent--blk-font-headingAdd the "Shimmer headline" block from Product Scope Blocks (https://resources.productscope.uk/blocks/blocks/shimmer-text) to my page. Link https://resources.productscope.uk/blocks/blocks/kit/blocks.css once. Paste the HTML from https://resources.productscope.uk/blocks/blocks/kit/blocks/shimmer-text.html and replace the placeholder text with my real content. Do not change the class names, add inline styles or add scripts. To change colours or fonts, override the --blk- variables in my own CSS. Do not invent facts, clients or numbers.