StealThis .dev

Velocity-Aware Scroll + Speed Lines

Canvas speed lines radiate from center and intensify based on how fast you scroll. Lenis velocity data drives line count, length, and opacity in real-time.

Open in Lab
lenisgsapcanvas-2dvelocity
Targets: JS HTML

Code

:root {
  --bg: #070a12;
  --text: #f0f4fb;
  --panel: #121a2b;
  --border: #263249;
  --accent: #86e8ff;
  --muted: #8a95a8;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Fixed canvas behind content */
#speed-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

section {
  position: relative;
  z-index: 1;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: radial-gradient(ellipse at center, rgba(134, 232, 255, 0.06) 0%, transparent 70%);
}

.hero .content {
  max-width: 600px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.subtitle {
  font-size: 1.1rem;
  color: var(--muted);
}

/* Content Sections */
.section {
  max-width: 760px;
  margin: 0 auto;
  padding: 5rem 2rem;
  border-bottom: 1px solid var(--border);
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.section p {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.section ul {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.section li {
  color: var(--muted);
  margin-bottom: 0.8rem;
  line-height: 1.7;
}

code {
  background: rgba(134, 232, 255, 0.1);
  color: var(--accent);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 0.9rem;
}

.btn-back {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.8rem 1.5rem;
  background: var(--accent);
  color: var(--bg);
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-back:hover {
  background: rgba(134, 232, 255, 0.8);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .hero h1 { font-size: 2.5rem; }
  .section h2 { font-size: 1.5rem; }
  .section { padding: 3rem 1.5rem; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2rem; }
}

html.reduced-motion #speed-canvas { display: none; }
html.reduced-motion * {
  animation-duration: 0.01ms !important;
  transition-duration: 0.01ms !important;
}

Velocity-Aware Scroll + Speed Lines

Canvas speed lines radiate from center and intensify based on how fast you scroll. Lenis velocity data drives line count, length, and opacity in real-time.

Source

  • Repository: libs-genclaude
  • Original demo id: 39-velocity-scroll-effect

Notes

Canvas speed lines radiate from center and intensify based on how fast you scroll. Lenis velocity data drives line count, length, and opacity in real-time.