Skip to content

Is it possible to disable Lenis.onVirtualScroll while holding down the Shift key? #358

Discussion options

You must be logged in to vote

hey @AleksandrIvanenko @Serator, i've just shipped a virtualScroll option that allows you to manually modify the events before they get consumed. If false is returned, the scroll will not be smoothed. Examples: (e) => { e.deltaY /= 2 } (to slow down vertical scroll) or ({ event }) => !event.shiftKey (to prevent scroll to be smoothed if shift key is pressed)

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
1 reply
@AleksandrIvanenko
Comment options

Comment options

@clementroche
Comment options

@AleksandrIvanenko
Comment options

@clementroche
Comment options

@Serator
Comment options

Comment options

You must be logged in to vote
1 reply
@AleksandrIvanenko
Comment options

Answer selected by clementroche
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants