Make your landing page feel alive

Click the headline to replay

The prompt

Written from your settings. Paste it into your AI tool.

Animate the main headline in the hero section of my landing page with an effect called Shine sweep. Fill the headline text with a linear gradient at 100 degrees using background-clip text. The gradient is the normal text colour everywhere except for a band of my accent colour in the middle that is 20 percent of the gradient wide. Make the background three times wider than the text and animate background-position so the band travels across the letters from left to right in about 2 seconds, then rests for about 1.6 seconds before repeating. Use ease-in-out. The text should look completely normal while the band is resting. Keep my existing font, colours and layout exactly as they are. Screen readers and search engines must still read the headline as one normal sentence, so put the full text in an aria-label on the heading and mark any decorative spans as aria-hidden. If the visitor has prefers-reduced-motion turned on, show the finished headline straight away with no animation. Make sure nothing shifts the layout while it plays. Use plain CSS and a little vanilla JavaScript, unless my project already has an animation library, in which case use that. A live demo with reference code for these exact settings is at https://smthngfun.com/a/shine-sweep and you can use that code as your starting point, adapted to my codebase and styling. If I am happy to credit the source, add a small "Animation by smthngfun" link to https://smthngfun.com in the footer of the page. Ask me before adding it.

Reference code

A working version of Shine sweep with your settings. It assumes the headline has the class hero-title.

<!-- HTML -->
<!-- Shine sweep animation from https://smthngfun.com/a/shine-sweep -->
<h1 class="hero-title">Make your landing page feel alive</h1>

/* CSS */
.hero-title {
  --text: #1c1c28;   /* your text colour */
  --accent: #c3b3f3; /* your accent colour */
  background: linear-gradient(100deg, var(--text) 40%, var(--accent) 50%, var(--text) 60%) 100% 0 / 300% 100% no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine-sweep 3600ms ease-in-out infinite;
}
@keyframes shine-sweep {
  0% { background-position: 100% 0; }
  55%, 100% { background-position: 0% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-title { animation: none; background: none; color: var(--text); }
}