Progress & Gamification
A thin bar pinned to the top of the viewport that grows as the reader scrolls. Widget-only, GPU-accelerated, tunable colour and height. Drop it once at the root of your layout and it works across every route.
Live preview
No extra dependencies. React 18+ and Tailwind CSS v3+ assumed. Save as ScrollProgressBar.tsx.
Paste the prompt into the tool you already use. Each version is written specifically for that tool, matched to the same design constraints so the output stays consistent.
Build components/ScrollProgressBar.tsx as a client component. Fixed top-0 left-0 right-0 z-50 with a configurable height (default 3px). Inner div uses transform scaleX from origin-left, tracking window.scrollY / (document.documentElement.scrollHeight - window.innerHeight). Smooth with rAF + lerp (0.15 factor). Configurable color (default #2B65F6). Props: color, height. Single default export. No extra dependencies.
Progress & Gamification
Reading Progress Rail (Sidebar with Read Time)
Floating reading progress rail for React article pages, shows percent complete and estimated read time.
Progress & Gamification
XP Progress Bar (Gamification Level Card)
XP progress bar card for React gamification: shows level, XP, and progress to the next level.
Progress & Gamification
Sticky Table of Contents Sidebar
Sticky React table of contents sidebar for long-form articles, highlights the active section as reader scrolls.
Copy the source file from the "Copy code" button and save it into your components folder. Add any listed dependencies (React 18 or later and Tailwind CSS v3 or later are always required, plus framer-motion or gradflow if the component lists them). Import and render the component wherever you want it. Every prop is optional and defaulted.
Yes. Every component takes props for its content (headline, subtitle, image URL, CTA, and so on) and uses Tailwind classes throughout, so you can restyle without touching the logic. For deeper design changes, paste the prompt into Claude Code, Cursor, Lovable, Replit, or Codex and describe your brand tokens, spacing, or motion tweaks.
Yes. Everything on this page is free to copy, adapt, and ship in commercial projects. No attribution required. If you post a public showcase we always appreciate a link back.
All five prompts produce the same design. Claude Code and Codex are best when you want the component slotted into a project with existing conventions. Cursor is ideal for editing inside your IDE with the file open. Lovable and Replit spin up a fresh preview fastest, useful for a quick play.
Yes. The source files are plain React 18 client components. They run on any framework that supports React 18 and Tailwind CSS v3. If a component needs the "use client" directive (all of them do here, since they use hooks), keep the directive at the top of the file when you paste.