darkroomengineering / lenis

How smooth scroll should be

Home Page:https://lenis.darkroom.engineering

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TODOS

clementroche opened this issue · comments

  • support pull to refresh and UI collapse on syncTouch
  • rename options correctly (eg: syncTouch -> touch.sync)
  • support scroll snap
  • support typescript
  • support more frameworks (Vue, Svelte, ...)
  • support RSC 'use client'
  • listen to overflow change and stop/start accordingly
  • include scroll-padding to scrollTo

Hello! I see that many types are typed as any in dist/types.
Would it be helpful to open a PR and make those types a bit narrower? Or are you working on it already?

@Myphz PR are always welcome

@Myphz PR are always welcome

I opened #345 to improve TypeScript support. Let me know if everything's ok! Thank you

Hi @clementroche regarding rename options correctly (eg: syncTouch -> touch.sync), you are talking about renaming and also refactoring the options passed on Lenis instantiation?

E.G:

const lenis = new Lenis({
    lerp: 0.1,
    touch: {
     sync: false,
     syncLerp: 0.075,
     inertiaMultiplier: 35
    },
});

Hi @clementroche regarding rename options correctly (eg: syncTouch -> touch.sync), you are talking about renaming and also refactoring the options passed on Lenis instantiation?

E.G:

const lenis = new Lenis({
    lerp: 0.1,
    touch: {
     sync: false,
     syncLerp: 0.075,
     inertiaMultiplier: 35
    },
});

Yes @giuliobracci

const lenis = new Lenis({
    wheel: {
      lerp: 0.1,
    },
    touch: {
     sync: false,
     lerp: 0.075,
     inertiaMultiplier: 35
    },
});