VibeFX
Live preview · fully interactive

The prompt

Build a shine streak on a button.

## Look
Button background #16161f, text #f2f2f7, radius 12px, padding 16px 28px. The streak is a 30% width linear-gradient from transparent through rgba(255,255,255,0.45), skewed -18deg. Page #08080d.

## Behavior
On hover, translate the streak from -120% to 420% once.

## Design tokens
- Button #16161f; streak rgba(255,255,255,0.45); page #08080d.

## Motion
- Duration 0.6s, ease, runs once per hover.

## Constraints
- Single self-contained HTML file. No libraries. CSS only.
- Honor prefers-reduced-motion: reduce by skipping the loop and leaving a readable static frame
- Readable at 390px width with no horizontal page scroll

The code

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<style>
  * { margin: 0; padding: 0; box-sizing: border-box; }
  html, body { min-height: 100%; }
  body {
    background: #08080d; color: #f2f2f7; font-family: Inter, system-ui, sans-serif;
    min-height: 100vh; overflow: hidden;
  }
  .hint { position: absolute; left: 16px; top: 16px; z-index: 5; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: #8a8a99; }
  main { min-height: 100vh; display: grid; place-items: center; } button { position: relative; overflow: hidden; border: 0; background: #16161f; color: #f2f2f7; border-radius: 12px; padding: 16px 28px; font-weight: 650; cursor: pointer; } button::after { content: ""; position: absolute; inset: 0 auto 0 -40%; width: 30%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent); transform: skewX(-18deg) translateX(-120%); } button:hover::after { animation: shine 0.6s ease; } @keyframes shine { to { transform: skewX(-18deg) translateX(420%); } }
  @media (max-width: 420px) {
    .hint { font-size: 10px; letter-spacing: 0.08em; }
  }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
  }
</style>
</head>
<body>
<main><button>Shine</button></main>

<script>

</script>
</body>
</html>

About this effect

A skewed white gradient translates from the left to the right in 0.6s when the pointer enters. It does not loop.

Similar effects