StealThis .dev

Scroll Progress Indicators

Three simultaneous scroll indicators: top bar, circular SVG progress, and section dot navigator.

Open in Lab
gsaplenisscrolltriggersvg
Targets: JS HTML

Code

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

:root { --bg: #070a12; --text: #f0f4fb; --muted: #8a95a8; --accent: #86e8ff; --neon-purple: #ae52ff; --border: #263249; }

html { background: var(--bg); color: var(--text); font-family: 'Inter', 'SF Pro Display', system-ui, sans-serif; }
body { overflow-x: hidden; }

/* Top bar */
.progress-top {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100;
  background: rgba(255,255,255,0.05);
}
.progress-top-fill {
  height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--neon-purple));
  transform: scaleX(0); transform-origin: left;
  will-change: transform;
}

/* Circular indicator */
.progress-circle {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 100;
  width: 48px; height: 48px;
}
.progress-circle svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.progress-circle .track { fill: none; stroke: var(--border); stroke-width: 3; }
.progress-circle .fill {
  fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round;
  stroke-dasharray: 125.66; stroke-dashoffset: 125.66;
  will-change: stroke-dashoffset; transition: stroke-dashoffset 0.05s linear;
}
.progress-pct {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem; font-weight: 700; color: var(--accent);
}

/* Section dots */
.section-dots {
  position: fixed; right: 2rem; top: 50%; transform: translateY(-50%); z-index: 100;
  display: flex; flex-direction: column; gap: 0.75rem;
}
.dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--border); border: none; cursor: pointer;
  transition: background 0.3s, box-shadow 0.3s, transform 0.3s;
}
.dot:hover { background: rgba(134,232,255,0.4); }
.dot.active { background: var(--accent); box-shadow: 0 0 10px rgba(134,232,255,0.4); transform: scale(1.3); }

/* Sections */
.section {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 4rem 2rem; border-bottom: 1px solid rgba(255,255,255,0.03);
}

.content { max-width: 600px; }

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

h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 700; letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff, var(--accent)); background-clip: text;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 1rem;
}

h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 1rem; }

.body-text { font-size: 1rem; color: var(--muted); line-height: 1.7; margin-bottom: 1rem; }
code { background: rgba(134,232,255,0.1); color: var(--accent); padding: 0.12rem 0.4rem; border-radius: 4px; font-size: 0.85rem; }

.btn-back {
  display: inline-block; margin-top: 1.5rem; padding: 0.7rem 2rem; border-radius: 999px;
  border: 1px solid rgba(134,232,255,0.3); color: var(--accent); text-decoration: none;
  font: 600 0.85rem/1 'Inter', system-ui, sans-serif; transition: all 0.25s;
}
.btn-back:hover { background: rgba(134,232,255,0.08); border-color: var(--accent); }

.reduced-motion .progress-top-fill { transition: none; }
.reduced-motion .progress-circle .fill { transition: none; }

@media (max-width: 640px) {
  .section-dots { right: 0.75rem; }
  .progress-circle { bottom: 1rem; right: 0.75rem; width: 40px; height: 40px; }
}

Scroll Progress Indicators

Three simultaneous scroll indicators: top bar, circular SVG progress, and section dot navigator.

Source

  • Repository: libs-genclaude
  • Original demo id: 06-scroll-progress

Notes

Three simultaneous scroll indicators: top bar, circular SVG progress, and section dot navigator.