Scroll Progress Indicator CSS Generator - Online
Create a sticky scroll progress bar for blog posts. Choose colors and height. Copy the minimal CSS and HTML.
UD5 Toolkit
📜 Demo Content — Scroll down inside this box
This is a demonstration area. On a real page, the monitor tracks window.scrollY and window.scrollX globally. Scroll this page up and down to see the values change live.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.
Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet.
🔍 Tip: Scroll the main page now and watch the numbers update in real-time above!
scrollTop / scrollY?
scrollTop (or window.scrollY) represents the number of pixels the document has been scrolled vertically from the top. It's the distance between the top edge of the viewport and the top edge of the document. A value of 0 means you're at the very top of the page.
scrollLeft / scrollX?
scrollLeft (or window.scrollX) measures horizontal scrolling — how many pixels the document has been scrolled from the left edge. This is less common on responsive websites but can occur on wide tables, code blocks, or fixed-width layouts.
Scroll percentage = scrollTop / (scrollHeight - clientHeight) Ă— 100. The denominator represents the maximum scrollable distance. When this value reaches 100%, you've scrolled to the very bottom of the page. If the page fits entirely within the viewport, the percentage is 0% (or NaN, which we display as 0%).
The most reliable modern approach: window.scrollY for vertical and window.scrollX for horizontal scroll position. Legacy alternatives include window.pageYOffset and document.documentElement.scrollTop. All major browsers support scrollY/scrollX.
scrollHeight and clientHeight?
scrollHeight is the total height of the document including content not visible in the viewport. clientHeight is the visible height of the viewport (the browser window's content area). Their difference gives the maximum scrollable distance.
Store the previous scrollY value and compare it with the current one. If current > previous, the user is scrolling down. If current < previous, they're scrolling up. This monitor tracks direction in real-time using this exact technique.
Smooth scrolling animates the transition between scroll positions. Use window.scrollTo({ top: value, behavior: 'smooth' }) or CSS scroll-behavior: smooth on the html element. The "Jump to" feature in this tool uses smooth scrolling for a polished experience.
Real-time scroll monitoring is essential for debugging scroll-based animations, implementing lazy loading, triggering events at specific scroll depths, measuring user engagement (how far users scroll), and building features like sticky headers, progress indicators, and infinite scroll.
scrollTopMax and maximum scroll values?
The maximum scroll value equals scrollHeight - clientHeight for vertical and scrollWidth - clientWidth for horizontal scrolling. Some browsers support the non-standard scrollTopMax property, but calculating it manually is more reliable across all browsers.
Horizontal scrolling is generally discouraged in web design as it creates a poor user experience, especially on mobile devices. It can also negatively impact SEO if content is hidden off-screen. Google's mobile-first indexing penalizes sites that require horizontal scrolling to access content. Always ensure your layout is responsive.
Use window.addEventListener('scroll', callback) but consider performance: scroll events fire rapidly. Debounce or throttle your handler, or use requestAnimationFrame for visual updates. For non-visual work, consider IntersectionObserver as a more performant alternative.
All scroll position values are displayed in CSS pixels (px). On high-DPI/Retina displays, CSS pixels may differ from device pixels. The monitor reflects what JavaScript reports via window.scrollY and window.scrollX, which always use CSS pixels regardless of device pixel ratio.
Create a sticky scroll progress bar for blog posts. Choose colors and height. Copy the minimal CSS and HTML.
See the International Space Station’s current position on a world map in real time. Uses public API. No refresh.
Enter a URL and see a list of its ARIA landmarks (banner, main, nav). Check document structure for accessibility. Local fetch.
Check current browser storage usage (localStorage, IndexedDB, Cache) and available quota. Handy debugging tool.
Register a custom CSS property with syntax, initial value, and inherits. Animate colors and numbers that couldn’t before.
Check estimated usage and quota for local and session storage on your browser. Quick dev tool.
Explore your website’s IndexedDB databases and object stores. Add, delete, and inspect records. Like phpMyAdmin for IndexedDB.
Explore your website’s IndexedDB databases and object stores. Add, delete, and inspect records. Like phpMyAdmin for IndexedDB.
See the chromaticity diagram and compare sRGB, DCI‑P3, and your display. Fun for design geeks.
Enter readings before/after meals, get averages, print report. Local storage only.
Estimate how many MB/GB your storage can hold based on navigator.storage.estimate() and display as a pie chart.
Read and write NDEF records to NFC tags using the Web NFC API. Supports text, URL, and MIME records. Works on Android with Chrome.
Keep a simple list of movies you want to watch. Add notes and check them off. Purely local storage.
A small widget that records your clipboard text history (only while open). Search and re‑copy old snippets. No log upload.
Paste an OpenAPI YAML/JSON and render a static, readable API document. No server, pure browser‑based rendering.
Demonstrate how the Web OTP API automatically reads one‑time codes from SMS (mobile). Simulation with a fake SMS input.
Use the CSS Custom Highlight API to style arbitrary text ranges without modifying the DOM. See the future of find‑in‑page.
Enter a URL and click to check if it's reachable from your browser (CORS-limited, uses no-cors fetch). Quick manual test. Local only.
Drag and drop pieces to set up a chess position. Generate FEN string and copy to share. Analyze openings. Local only.
Scan QR codes using your device camera. Decodes text, URLs, and Wi‑Fi credentials directly in the browser. No data sent to server.
Create a pure CSS scroll progress indicator using animation‑timeline: scroll(). No JavaScript. Copy the complete code.
Send a test CSP violation report and see the ReportingObserver in action. Understand how monitoring works.
Write a media query and see if it matches as you resize the iframe. Understand width, height, and resolution queries.
Watch for updates to aria‑live regions and log what a screen reader would announce. Debug live regions.
Select any element on the test page and monitor its size changes with ResizeObserver. See log of all entries.
Drag a positioned box and see the top/right/bottom/left values change. Understand containing blocks. Visual.
See how overflow: visible, hidden, scroll, and auto behave with real content. Clone to test with your text.
Use CSS masks and fixed backgrounds to create a unique parallax reveal effect. Copy the code. No JavaScript.
Connect a MIDI controller and see every message in a log. Filter by channel and type. Essential for debugging music apps.
Play an audio file or use mic to see real‑time frequency bars. Choose colors. Great for music videos. Canvas.