Overlays & feedback / Progress bars

Vertical Scroll Indicator

Thin vertical track at the right viewport edge with a short black rounded thumb marking scroll position.

Rebuilt from lusion.co in the Periwinkle Studio Float style.

npx shadcn@latest add https://justyoink.it/r/periwinkle-studio-float/blocks/scroll-progress-indicator.json

Looks exactly like lusion.co: brings its fonts and colours, namespaced so your own theme stays untouched.

Usage

Drop it anywhere; by default it is fixed at the right viewport edge and its thumb follows page scroll. Props: trackHeight, thumbHeight (px), label (aria), fixed (set false to place inline).

components/scroll-progress-indicator.tsx
import { useEffect, useState } from "react";

export default function VerticalScrollIndicator({ label = "Page scroll position", trackHeight = 180, thumbHeight = 36, fixed = true }: { label?: string; trackHeight?: number; thumbHeight?: number; fixed?: boolean }) {
  const [p, setP] = useState(0);
  useEffect(() => {
    const onScroll = () => {
      const max = document.documentElement.scrollHeight - window.innerHeight;
      setP(max > 0 ? Math.min(1, Math.max(0, window.scrollY / max)) : 0);
    };
    onScroll();
    window.addEventListener("scroll", onScroll, { passive: true });
    window.addEventListener("resize", onScroll);
    return () => {
      window.removeEventListener("scroll", onScroll);
      window.removeEventListener("resize", onScroll);
    };
  }, []);
  const travel = trackHeight - thumbHeight;
  return (
    <div
      role="progressbar"
      aria-label={label}
      aria-valuemin={0}
      aria-valuemax={100}
      aria-valuenow={Math.round(p * 100)}
      className={(fixed ? "fixed right-1 top-1/2 -translate-y-1/2 z-50 " : "relative ") + "w-[6px] rounded-pill bg-ink/10 pointer-events-none"}
      style={{ height: trackHeight }}
    >
      <div
        className="absolute left-0 w-full rounded-pill bg-ink will-change-transform"
        style={{ height: thumbHeight, transform: `translateY(${p * travel}px)` }}
      />
    </div>
  );
}

Quality checks

Automated, in a real browser · today
—

More from Periwinkle Studio Float

The whole style →

Tilted Panel Loader

Animated graphics

Floating Pill Header

Headers & nav bars

Oversized Section Heading with Side Blurb

Feature sections

Rounded Project Tile

Cards

Dot-Separated Category Tags

Badges & tags

Plus Crosshair Grid Markers

Animated backgrounds