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.
Questions tagged [locomotive-scroll]
111 questions
0
votes
0 answers
I'm using GSAP and locoScroll with reactJS, how can i check the trigerring point value?
This is my function that i made. The elements which i'm targeting moves only when the page is reloded.
I wanted to move the elements #moveLeft and #moveRight when the scroll reaches 27% from top and when we slide back up the elements must move back…
0
votes
0 answers
Getting an error, How can i use GSAP with ReactJS?
error:
my main.js component:
I installed all libraries of gsap, locomotive, scrollTriger, but yet i m getting this error. i was expecting to make my scroll smooth and moving my heading tags when triggered by the scroll. But i'm just getting an…
0
votes
1 answer
Match error in nuxt3 app with locomotive scroll
I have nuxt3 project with locomotive scroll and gsap (repo: https://github.com/cyprianwaclaw/Skandynawia-Przystan). I have a problem, when I change page ep. index to test and reverse page dons't change and I my console has error:…

Cyprian Wacław
- 31
- 1
- 5
0
votes
0 answers
Locomotive Scroll : How to stop scrolling with an overlay modal?
I started using locomotive and made an overlay menu.
Normally I should have use an overflow hidden. But here it's not working
.scroll-stop
{
overflow: hidden !important;
}
$('#toggle').click(function() {
$(this).toggleClass('active');
…

Evilcampbell
- 1
- 1
0
votes
0 answers
Using Locomotive Scroll makes the page fall down
Using React + Three JS + dat.gui + GSAP + Locomotive Scroll. When I enable loco scroll, this happens:
The PAGE when scroll is enabled
useEffect(() => {
const locoScroll = new LocomotiveScroll({
el:…

Sadness7311
- 1
- 1
0
votes
0 answers
Trouble finding the right plugin to animate text
For a new project I'm looking for a smooth scroll plugin that animates different elements with parallax effects and more.
Right now I'm using locomotive scroll and it works really nice, but it doesn't work on mobile like I want too.
The effect i'm…

Htothep
- 1
0
votes
0 answers
React Locomotive scroll and scss styles not working correctly
I have a website build with webpack 5
My CSS loaders look like this:
export function buildCssLoader(isDev: boolean) {
return {
test: /\.s[ac]ss$/i,
use: [
// Creates `style` nodes from JS strings
isDev ?…

Ana
- 27
- 6
0
votes
1 answer
How to export an instance of a library created inside a custom hook in React?
I am using LocomotiveScroll in a React application and I have created a custom hook called useLocoScroll to handle the initialization and destruction of the LocomotiveScroll instance in order to make LocomotiveScroll work with gsap's ScrollTrigger.…

Oliver
- 177
- 1
- 10
0
votes
1 answer
Add class to the nearest element inside a foor loop
i'm trying to add class to an image looping into an Array.
I have an array of elements settled with an document.querySelectorAll.
When i hover into a single of this element i want to add a class to his image, but when hovering the only image with…

maurodf
- 13
- 2
0
votes
0 answers
Locomotive scroll doesn't work when change page on Nuxt3 project
I use Locomotive scroll with gsap scrollerProxy in Nuxt3 project. When change page from index to /tets locomotive scroll doesn't work. My tets page code:

Cyprian Wacław
- 31
- 1
- 5
0
votes
1 answer
I want to implement smooth scroll with like cuberto.com but react-locomotove-scroll is disturbing the css
I want to add smooth scroll along the effect like this codepen shows :- https://codepen.io/jrsouth/pen/xPybjd, but if I copy this same codepen and add locomotive-scroll to it, it just looks like a normal html document and no effect is seen.
I want…
0
votes
0 answers
Locomotive Scroll and pageYOffset
How can scrollTo-back button be seen after scrolling a certain scrolling-height when using Locomotive scroll and pageYOffset?
I was trying to use pageYOffset but is not working.

Kepha Motari
- 1
- 1
0
votes
0 answers
Locomotive Scrolling Parallax Effect not working properly
Issue: parallax effect is not working on the Parallax section. Notice that it flicks when the section shows up which is not what I want.
Currently data-scroll data-scroll-speed="-3" is on my experience section
What I did: For some reason, it works…

Giovanny
- 11
- 3
0
votes
1 answer
SyntaxError: Cannot use import statement outside a module [Locomotive Scroll Vanilla JS]
For some reason i'm getting this error: SyntaxError: Cannot use import statement outside a module.
I've tried a few different things to make it work like using requiere() on the imports in js, etc. How can i fix this? I already also installed using…

Giovanny
- 11
- 3
0
votes
0 answers
App element not found in react while rendering the dom
I have created a language page using react 17 and when I upgraded my all my packages, now using react 18 while rendering i got error saying .App element not found this element is dependent to react-locomotive-scroll. I have created similar code…

Prakash Sharma
- 31
- 7