Thanks for this explanation. Clear and precise. Made me also realize tailwind would be ugly and annoying to use in projects. Extensive lines of styling all over the place makes everything look chaotic
Hey there. I implemented this into my portfolio after watching your portfolio video. I love how it came out! However, for some reason my image gallery goes over my navbar when I scroll down. Any solution for that?
Hi boss, I implemented the code but in my browser it showing uncaught runtime error cannot read properties of null (reading '''scrollLeft'') can you help
hi great channel ; - ) i have rect+vite-tailwind , but there is a problem with local img not showing up, even after import, when I import from http it works
Isn't there any other way to achieve this, I mean without using a querySelector? Shouldn't we avoid using querySelector in React? Looks somewhat hacky to me. However, I still appreciate what you've done. Thanks
I have followed all your code and it's still not working, is it because I use typescript and and Next js ? the javascript is not running smooth at all only jumping and jumping when I scroll.
so I used the scroll function exactly like you showed in the video, but its not working.. I am using nextjs with typescript, but here is the code: const slideLeft = () => { let slider: HTMLElement = document.getElementById('slider')! slider.scrollLeft = slider.scrollLeft - 500 } const slideRight = () => { let slider: HTMLElement = document.getElementById('slider')! slider.scrollLeft = slider.scrollLeft + 500 }
Appreciate your efforts man Everything sounds good excpet getelementbyid. Dude you are manipulating the DOM directly which we should not do in React JS
great video! been looking for this for a while!
Exactly what I've been looking for! Thanks man ❤
Thank you Ansh!
Thanks for this explanation. Clear and precise. Made me also realize tailwind would be ugly and annoying to use in projects. Extensive lines of styling all over the place makes everything look chaotic
lol i'm in love with tailwind.
Loving the new branding ! Code commerce ftw.
Really appreciate your content man.
Appreciate it! I was thinking of changing the name of the channel to my full name - not sure yet.
Thanks for sharing this was very useful and easy to implement and you explain the steps very well 👍
Glad it was helpful!
Amazing and helpful ty😭
short easy at the point and perfect that what can i say about this video thanks
Very helpful! Thanks man 🙏🏻🙏🏻
Thanks man!
greately explaine brother......
brother it's helpful I hope for you success
Thank you so much!
I LIKE YOU CUZ YOU GOT THAT SOMETHING THAT I NEED IN MY LIFE SO GIVE IT TO ME!!!
thanks man, kudos to you
Very usefull! Thanks for sharing
Thank you dude!
nice video. thank you
thanks a lot!
Welcome!
that is what i wanted thanks alot
Thank you sir!
thank you. very helpfull
Thank you 🙏
What if i want to write something below the image? I noticed that if i add a h1 tag after the img tag the layout breaks.
Thank you.
i want that. Thanks. Can we do the same with tailwind css in more easy way
thank you for the tutorial video,
How do we disable buttons when we are at the first element and last element on the screen?
Not sure, but what if we loops through index & find first & last items index
Thank you very much
Thank you Anderson
muchas gracias ! me sirvio de mucho
Anytime sir!
Awesome video +++++++++++++++++ 😃
please tell me how to add infinity autoplay slide
Hey there. I implemented this into my portfolio after watching your portfolio video. I love how it came out! However, for some reason my image gallery goes over my navbar when I scroll down. Any solution for that?
Awesome! Check the positioning & z-index in CSS :)
I was looking for the same can we add videos instead of images ? Can please make a video on that how can we add videos in this slider?
Hi boss, I implemented the code but in my browser it showing uncaught runtime error
cannot read properties of null (reading '''scrollLeft'') can you help
hi great channel ; - ) i have rect+vite-tailwind , but there is a problem with local img not showing up, even after import, when I import from http it works
Haven’t done much with Vite.
Is this menu scroll-able with touch screens? I mean is it possible to swipe left and right in mobile devices without clicking the icon buttons?
I tried to add a div that wrap the img tag but again the layout breaks.
thank you
You're welcome!!
can scrollLeft be modified ?
Isn't there any other way to achieve this, I mean without using a querySelector? Shouldn't we avoid using querySelector in React? Looks somewhat hacky to me. However, I still appreciate what you've done. Thanks
Mounis - you are correct, a bit hacky. Perhaps I’ll do a follow up video with useRef
@@codecommerce that'll be great
I have followed all your code and it's still not working, is it because I use typescript and and Next js ? the javascript is not running smooth at all only jumping and jumping when I scroll.
Can I do that without Tailwind?
How can we scroll on touching the items?
Like click and drag?
@@codecommerce yeah
Sir Can you please try this with videos??
Good idea pingu
@@codecommerce I have tried this with videos with tailwind css and it worked.😊
@@codecommerce sir one more thing can we connect multiple pages in reactjs. And also full website with frontend and backend
not reponsive ?
so I used the scroll function exactly like you showed in the video, but its not working..
I am using nextjs with typescript, but here is the code:
const slideLeft = () => {
let slider: HTMLElement = document.getElementById('slider')!
slider.scrollLeft = slider.scrollLeft - 500
}
const slideRight = () => {
let slider: HTMLElement = document.getElementById('slider')!
slider.scrollLeft = slider.scrollLeft + 500
}
U ARE Fix this ? I have the same issue
@@daotieesn Yeah you need to wrap a div around the div that has the slide function.
God
Appreciate your efforts man
Everything sounds good excpet getelementbyid. Dude you are manipulating the DOM directly which we should not do in React JS
thats not realy optimised.. 2 function for that please only 1 is needed... and why getElementByid please use useRef with hooks
Make your own tutorial and post it.
const sliderRef = useRef(null);
//use this is your element
ref={sliderRef}
const slideLeft = () => {
sliderRef.current.scrollLeft -= 500;
};
const slideRight = () => {
sliderRef.current.scrollLeft += 500;
};
Pls sir use bootstrap css, in india developer don't use tailwind css
Oh no I hate using bootstrap! haha. I'll try and use it a least once in a video :)