Implement scroll snaping

Author: patchthecodeCreated Apr 26, 2023Updated Apr 14, 2026
Labelsquestion

Clear and concise description of the problem

When we scroll there is no snapping with this library. This lets the list scroll until decelerated, but many times for visual purposes, it would be nice that it decelerates with the object in the center of the screen.

Suggested solution

Im not sure how to implement this with this library, but with regular html and css, its as simple as giving the parent div the

css
scoll-snap-type: x;

and giving the child div

scroll-snap-align: center; // or the other options

Alternative

No response

Additional context

related issue. but dead.. no replies or comments for years... https://github.com/Akryum/vue-virtual-scroller/issues/543

Validations

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.

Source: Akryum/vue-virtual-scroller