17 CSS Range Sliders

17 Light JSPublished

17 CSS range sliders for e-commerce price filters, audio volume and equalizer panels, video seekbars, smart-home thermostat dials, course-progress trackers, and loan calculators — spanning dual-handle price ranges, neumorphic and glassmorphic tracks, radial and vertical inputs, emoji mood and password-strength selectors, isometric 3D perspectives, and bubble-tooltip thumbs. Scoped under .rs-NN for no-collision pasting, prefers-reduced-motion guarded, framework-agnostic.

Related28 CSS Input Fields22 CSS Progress Bars20 CSS Image Sliders

Course pickPartner: Zero to Mastery

Affiliate link

Want to build production-ready CSS layouts, animations and UI from scratch?

You just browsed 17 range sliders. Learn the Flexbox, Grid and animation thinking behind them, so the next component starts in your head, not in a copy-paste.

10% off at checkout with code
Check ZTM Course

Every ZTM course in one membership: $25/month, paid yearly at $299 · 30‑day money-back guarantee

The CSS Bootcamp. We may earn a commission, at no extra cost to you.

Newsletter

Enjoying these demos? Get new ones by email.

A short email when a new collection ships. Unsubscribe any time.

at

Almost there: check your inbox to confirm.Manage

09. Gradient Fill Progress Slider (opens in a new tab)

Published

CSS + JS
A clean course-progress slider where the filled portion carries a continuous sunset-orange-to-violet gradient, the percentage display mirrors the same gradient via background-clip, and milestone cards illuminate as thresholds are crossed.

10. Bubble Pop Tooltip Slider (opens in a new tab)

Published

CSS + JS
A loan calculator slider where pressing the thumb pops up a teardrop speech bubble with a spring scale animation, live loan amount and monthly payment calculations update in real time, and the bubble tracks the thumb position precisely.

12. Password Strength Indicator Slider (opens in a new tab)

Published

CSS + JS
A security-themed slider where dragging through character count zones triggers animated color transitions across the shield icon, segmented strength bars, fill track, thumb, and checklist items — from weak red through fair amber to strong cyan.

13. Double-Sided Balance Slider (opens in a new tab)

Published

CSS + JS
An audio panning control centered at zero where the fill extends left or right from the midpoint in opposing channel colors, with a live bar graph visualizer, percentage readouts per channel, and a center reset button.

14. Retro 8-Bit Pixel Art Slider (opens in a new tab)

Published

CSS + JS
A nostalgic arcade-style health meter where the slider thumb is a pixelated gold gem, the fill uses a segmented dotted-line pattern, the character sprite changes emoji based on HP level, and gold coin indicators fill up like lives.
Newsletter

Enjoying these demos? Get new ones by email.

A short email when a new collection ships. Unsubscribe any time.

at

Almost there: check your inbox to confirm.Manage

17. Glass Slider with Bubble Tooltip (opens in a new tab)

Published

CSS + JS
A range slider where the value tooltip is a drop of Liquid Glass that morphs out of the track itself: as you drag, a bubble stretches up from the filled portion, detaches with a gooey neck, and floats above the thumb showing the live value — the fluid feedback control from modern iOS settings.
FAQ

Frequently asked questions

How do I style the native <input type="range"> thumb and track in CSS?
The native range input is one of the few HTML elements where each browser still ships its own shadow-DOM internals — there's no single cross-browser selector for the thumb or track yet. The recipe: (1) zero out the platform default with appearance: none (and -webkit-appearance: none for older Safari) on the input[type=range] itself; (2) style the WebKit/Blink track with ::-webkit-slider-runnable-track and the thumb with ::-webkit-slider-thumb (Chrome, Edge, Opera, Safari); (3) style the Firefox track with ::-moz-range-track and the thumb with ::-moz-range-thumb; (4) re-apply the thumb size with margin-top calculations on WebKit so the thumb visually centers on the track. The new spec-track pseudo-elements (::slider-thumb, ::slider-track) are landing in Chrome 138+ but you still need the vendor-prefixed selectors for the next 2-3 years. Every demo in this collection ships both webkit + moz selectors duplicated so the slider looks identical in all four major browsers.
How do I make a dual-handle / two-thumb range slider for a price filter?
The native <input type=range> only supports ONE thumb. The two-thumb dual-handle pattern requires stacking TWO range inputs on top of each other with position: absolute; pointer-events: none on the track, then giving each handle independent pointer-events: auto. The lower input handles the MIN value, the upper input handles the MAX value; JS clamps the two so they can't cross (max = Math.min(maxInput, minInput - 1)). The visible filled track between the two thumbs is rendered as a separate <div> that listens to both inputs and updates its left + right percentages on every input event. Demo #01 (Price Range Slider with Dual Handles) ships the full recipe with min/max display and the e-commerce-style currency formatting. This is the #1 dual-handle slider pattern across Amazon, Shopify, and every product filter you've ever used.
Can I make an accessible range slider that works with keyboard + screen readers?
Yes. The native <input type=range> is keyboard-accessible out of the box: arrow keys decrement/increment by step, Page Up/Down jump by 10×, Home/End go to min/max. Screen readers announce the value via the input's implicit ARIA role of slider plus the aria-valuenow attribute the browser sets automatically. To make a CUSTOM-STYLED range slider equally accessible, three rules: (1) NEVER replace the native input with a div-based slider — keep the native input as the source of truth and style its pseudo-elements; div sliders re-implement focus + keyboard handling and almost always break it. (2) Add a visible :focus-visible outline on the thumb so keyboard users see where focus is. (3) Wrap continuous animations in @media (prefers-reduced-motion: reduce) so users with vestibular sensitivity get instant feedback instead of moving thumbs. Every demo in this collection follows these three rules.
Why does my custom range slider look broken in Firefox? (cross-browser inconsistency fix)
Firefox's ::-moz-range-thumb pseudo-element behaves differently from WebKit's ::-webkit-slider-thumb in three subtle ways most tutorials miss: (1) Firefox renders a thin focus outline INSIDE the thumb by default — kill it with ::-moz-focus-outer { border: 0 } and add your own :focus-visible outline. (2) Firefox respects appearance: none on the input but you also need appearance: none on ::-moz-range-thumb itself or it shows the platform dot inside your custom thumb. (3) Firefox positions the thumb VERTICALLY-CENTERED on the track automatically, but WebKit doesn't — you need margin-top: calc((track-height - thumb-height) / 2) on ::-webkit-slider-thumb to match. This is the #1 unanswered Stack Overflow question about range sliders. Every demo in this collection ships both webkit AND moz selectors with the centering math correct.
How do I make a circular / radial range slider (thermostat dial)?
True circular range inputs aren't a native HTML primitive — <input type=range> is always linear. The dial pattern (demo #08 Circular Radial Dial) wraps a hidden linear range input inside a circular SVG arc, then JS maps pointer angle to the input's value. The visible dial is the SVG: a background arc (the track) + a foreground arc whose stroke-dasharray equals the circumference and whose stroke-dashoffset interpolates with the input's value to draw the filled portion. The thumb is a small SVG circle positioned at the angle corresponding to the current value (basic trig: cx = centerX + radius * cos(angle), cy = centerY + radius * sin(angle)). Pointer events on the SVG (or wrapper div) compute the angle from the centre and dispatch input events on the hidden native range so all the accessibility benefits (keyboard, screen reader, aria-valuenow) work for free. Total: ~60 lines of JS for the production pattern.
How do I make a vertical range slider (audio mixer / equalizer)?
Two approaches with different tradeoffs. (A) writing-mode: vertical-lr + direction: rtl on the input — pure CSS, no JS, the browser handles all the keyboard interaction (Up/Down arrows work correctly), but Firefox renders the thumb slightly differently and you lose fine control over the track + thumb geometry. (B) Set appearance: slider-vertical (WebKit) + -moz-orient: vertical (Firefox) plus an explicit transform: rotate(-90deg) on the input with width/height swapped — older approach, more compatible, but transforms break some keyboard handling and screen reader announcements. Demo #07 (Vertical Audio Equalizer) ships the writing-mode approach because it's more accessible and the spec-blessed direction for the future. The equalizer demo composes 5 vertical sliders side-by-side with frequency labels — paste it into a music player UI and ship.
How do I add a bubble tooltip that follows the slider thumb showing the current value?
Position a small <div class="bubble"> absolutely above the input track. On every input event, JS reads the input's value and sets the bubble's left to a percentage of the track width: bubble.style.left = ((value - min) / (max - min) * 100) + '%'. Apply transform: translateX(-50%) on the bubble so it centers on the thumb's vertical centerline rather than starting at it. The bubble's ::after pseudo-element is a small triangle pointing down at the thumb (CSS triangle via 0 border on 3 sides). The visible bubble appears on :focus or :active and fades out 1-2 seconds after the user releases the thumb. Demo #10 (Bubble Pop Tooltip Slider) ships the full pattern with currency formatting for a loan calculator use case ($15,000, $45,000, etc.). Common UI on banks, finance dashboards, and SaaS pricing tiers.
How is this different from FreeFrontend, FrontendPlanet, uiCookies, devsnap, or Slider Revolution?
The big gallery sites (FreeFrontend 40+, FrontendPlanet 76, uiCookies 35) curate links to CodePen demos — you click out, view the demo on CodePen, copy code, paste it into your project. The demos use generic class names like .slider, .range, .thumb that collide if you paste two into one project; many have no Firefox styling at all because the original author tested only Chrome. Slider Revolution is a premium WordPress plugin marketing page, not a free code resource. LogRocket / CSS-Tricks / a11y with Lindsey are deep technical tutorial articles — great for learning, not for copy-paste UI. This collection sits in a different niche: on-page interactive playgrounds for all 16 designs (try them in your browser without leaving the tab), every demo scoped under a unique .rs-NN prefix so they NEVER collide when pasted together, every demo cross-browser tested with both ::-webkit-slider-thumb and ::-moz-range-thumb styles, and every demo wrapped in @media (prefers-reduced-motion: reduce) for accessibility. Free, MIT-licensed, no signup.

Related collections

15 CSS 3D Tilt Hover Cards preview

15 CSS 3D Tilt Hover Cards

15 mouse-aware 3D tilt hover cards — e-commerce product spotlight, glassmorphism parallax team card, interactive pricing tier, holographic NFT collectible, pop-out mascot, dark tech grid with border glow, media player album art, blog article preview, cyberpunk neon glow, dashboard KPI widget, minimalist real estate, flip-to-back tilt, mobile app showcase, course learning card, and a Pure CSS touch-friendly tilt. Vanilla JS writes --rx/--ry/--mx/--my; all rendering stays in CSS on the GPU.

24 CSS Animated Cards preview

24 CSS Animated Cards

24 hand-coded CSS animated card patterns organised by what triggers the motion, not by card style. Scroll and entrance triggers: staggered grid reveals, @starting-style mount-in, scroll-driven scale and fade on animation-timeline: view(), View Transitions API card-to-detail morphs, blur-to-sharp lazy image loading, and FLIP re-layout when a filter changes. State-change triggers: add-to-cart success morph, like and save particle burst, expand and collapse to intrinsic height with calc-size(), swipe-to-dismiss on Pointer Events, and skeleton-to-loaded crossfade. Data-driven triggers: count-up KPI metrics, SVG sparkline draw-on-enter, and progress ring fill on load. Ambient idle loops: breathing glow, floating drift, animated gradient mesh backgrounds, conic rotating borders, auto-cycling testimonial decks, and live status pulses. Plus four hover patterns where the effect is the topic itself: cursor spotlight, holographic foil glare, corner ribbon slide, and horizontal accordion expand. Every card is scoped under a .ac-NN prefix for no-collision pasting, guards prefers-reduced-motion, animates compositor-only properties, and ports unchanged to React, Vue, Svelte, Astro, Next.js and Tailwind.

22 CSS Avatars preview

22 CSS Avatars

22 hand-coded CSS avatars for chat apps, team dashboards, comment threads, account menus, and social profiles. Covers circular and squircle shapes, gradient and conic story rings, hexagon clip-path crops, online status dots, notification count badges, verified checkmarks, stacked facepiles with plus-N overflow, initials fallbacks for users without photos, broken-image recovery, avatar pickers, and a size scale system where the ring, badge, and status dot all scale from a single custom property.

Search CodeFronts

Loading…