GODRICH
#css-animation#button#loader#transition#scroll#dashboard#ui#design-trends

05Tick snap — finding the nearest tick and sticking with a restoring bounce

Round the value to the nearest multiple of the tick step, then on release pull it in with a restoring force proportional to the remaining distance — it lands like a magnet. A frame or two of overshoot before the snap is what sells the 'stick.'

Best forHeadcount and quantity pickers, stepped settings

pointeruprequestAnimationFrameCSS custom properties
Tick snap — finding the nearest tick and sticking with a restoring bounce
Open in a new tab

05 Tick snap — finding the nearest tick and sticking with a restoring bounce — Measured area 3.133% · moving frames 19/23Original by GODRICH · SCSS and React ship in the zip · CSS Range Slider: 9 Physics-Grade Custom Sliders

The post this demo lives in

CSS Range Slider: 9 Physics-Grade Custom Sliders - preview of all 9 demosCSS Range Slider: 9 Physics-Grade Custom SlidersA css range slider, explained: A velocity lerp decays your drag to rest, and a spring overshoots the thumb on each value See all demos in this post

If you like this effect - similar demos