How to use the stylefire/scroll function in stylefire

To help you get started, we’ve selected a few stylefire examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github stipsan / scroll-into-view-if-needed / website / components / Examples / OverrideBehavior.tsx View on Github external
behavior: instructions => {
        const { el: frame, left } = instructions[0]
        const elementScroll = scroll(frame)

        spring({
          from: frame.scrollLeft,
          to: left,
          //stiffness: 200,
          //damping: 10,
        }).start(v => elementScroll.set('left', v))
      },
      boundary: this.container.parentNode as Element,

stylefire

Performant, simplified stylers for CSS, SVG, path and DOM scroll.

MIT
Latest version published 4 years ago

Package Health Score

64 / 100
Full package analysis