Questions tagged [locomotive-scroll]

Locomotive scroll is a simple scroll library, it provides smooth scrolling with support for parallax effects, toggling classes, and triggering event listeners when elements are in the viewport.

111 questions
3
votes
2 answers

import LocomotiveScroll from 'locomotive-scroll'; isn't working

apparently LocomotiveScroll isn't imported, so I can't use smooth scroll: '''import LocomotiveScroll from 'locomotive-scroll';'''
3
votes
2 answers

Locomotive Scroll flickering

Using Locomotive scroll causes some flickering when scrolling upwards. The elements in the upper sections appear in the viewport with a small but noticeable lag (maybe 0.1 sec). I saw a lot of demos, but almost all of these websites have the same…
bersus
  • 31
  • 1
  • 5
3
votes
2 answers

How to correctly use Locomotive Scroll with Next.js routing?

I'm using locomotive-scroll with Next.js and all working fine. But after route to a different page, my scroll won't destroy and 2 scrolls overlap each other. How to correctly reinit locomotive-scroll in Next.js after route? My code example: function…
3
votes
0 answers

Locomotive Scroll get elements position

I am using Locomotive Scroll for a smooth scroll effect. I need to change the background-color and the color of the whole HTML when reaching a certain section. At the moment I am using the call event on locomotive to add a custom function called…
Rado
  • 729
  • 1
  • 8
  • 20
2
votes
0 answers

React Router Link brakes the website if clicked while is animated

I've implemented a horizontal scroll animation using gsap for a projects section, but I've run into an issue. When I click on a project that is currently being animated by gsap, my entire portfolio breaks. The Link tag from React Router does change…
Oliver
  • 177
  • 1
  • 10
2
votes
0 answers

Integrating react locomotive scroll while using framer-motion's scroll trigger animations is buggy

I have a few framer-motion scroll trigger animations, nothing too complicated, in my current application and I wanted to integrate locomotive scroll using https://www.npmjs.com/package/react-locomotive-scroll. However, when I add it and start…
2
votes
1 answer

Why does the scroll only take up half the width of the item? Locomotive scroll

Why do the elements only scroll halfway through and then freeze? In the locomotive scrolling demonstration itself, these elements don't stop, but scroll further. I need the exact same thing. What needs to be set or changed for this? demo
2
votes
0 answers

Scrollmagic timeline fade-in-out text not working as expected

I've created a syncronized horizontal timeline slider which should also fade-in-out some text on top of another. Unfortunately I am unable to understand how I could fade out the last slide's text when the new one appears in a timeline logic - with…
user3615851
  • 999
  • 1
  • 15
  • 40
2
votes
0 answers

How to use locomotive-scroll in NextJS?

I want to beautify my project using locomotive-scroll in my nextjs app. But I keep getting the error document is not defined. How can I solve this? In short, this is what I need to know. Thank you from now! import React, { useEffect } from…
nigranac
  • 193
  • 3
  • 14
2
votes
1 answer

How to use scrollTo in locomotive-scroll with reactJS

How to configure the LocomotiveScrollProvider so that when the button is pressed, it scrolls to the top of page?
2
votes
1 answer

struggling to install node-sass in react-app

It all began after installing locomotive-scroll. I have been trying to install node-sass in my react app. I tried npm install node-sass but I got an error ERR_SOCKET_TIMEOUT I can't even run npm start command, it gives these…
Myrat
  • 347
  • 2
  • 4
  • 16
2
votes
1 answer

nuxt with locomotive-scroll and gsap issue on route change

I have been straggling to achieve a smooth scrolling effect on my Nuxtjs project using the locomotive scroll and gsap scrollTrigger and Scrollproxy. But having some wired issues on my halfway which I can't go back to. I am using Typescript and…
2
votes
1 answer

Locomotive Scroll - switching from horizontal to vertical and back

I am using Locomotive-Scroll (https://locomotivemtl.github.io/locomotive-scroll/) for smooth and horizontal scrolling, it's easy and works well. However, I'd like to integrate a section of vertical scrolling as well. Visual Explanation I've tried…
2
votes
1 answer

Locomotive scroll elements crashing and disappearing on live server

I have made a site using locomotive scroll which worked perfectly until I uploaded to a live server. On the live server the elements sometimes bump into each other and then flicker and disappear and the footer is also cut off. It seems that the…
golds1981
  • 31
  • 1
  • 4
2
votes
0 answers

locomotive scroll - impossible to scroll need to resize window before

I have an issue on my project, I have a page with full image displayed with the library Locomotive scroll, but to scroll the page, I need to resize him before.. How can I fix that to avoid to resize my window before in order to scroll the page I use…
1
2 3 4 5 6 7 8