Build a React Image Slider with Tailwind CSS

Поділитися
Вставка
  • Опубліковано 25 лис 2024

КОМЕНТАРІ • 141

  • @vitorac412
    @vitorac412 Рік тому +35

    If you are using next image component, just do this:
    const slides = [image, image, image]
    Im currently learning, so I think this can save some time for another people;

    • @Darkah
      @Darkah Рік тому

      Im using Nextjs and i got the userState error, how to solve not using jsx and how to solve for non server renderation

    • @ad3098
      @ad3098 10 місяців тому

      "use client"@@Darkah

  • @nixonmbeki5690
    @nixonmbeki5690 3 місяці тому +2

    Used to think carousel required some esoteric knowledge until I went through this video. Massive thanks man.

  • @manjeshkumarsharma4946
    @manjeshkumarsharma4946 Рік тому +9

    Your Videos are amazing buddy. I just watched this video till 7 minutes after that I started making my own slider component. And after 1 hour of brainstorming I made it. Your git repository also helped a lot. THANKYOU SO MUCH

  • @GiantSquid13
    @GiantSquid13 10 місяців тому +3

    I love how you went straight to the point.
    Thank you so much

  • @sumanthprabhu11
    @sumanthprabhu11 Рік тому +6

    In Appu Indian Accent ->This was the Easiest Tutorial of a Carousel / Slider I have ever seen.
    Thanks to you and Tailwind CSS

  • @samuelreedy1389
    @samuelreedy1389 Рік тому +1

    tried a bunch of different carousel packages for react/typescript, this tutorial smashes them all out of the park, with no dependencies either, nice

  • @mtsurov
    @mtsurov Рік тому +14

    This is quickly becoming a book of useful recipes.
    In 18 minutes I learned what Udemy would stretch into 4 hour course.
    Well done.

    • @arhabersham
      @arhabersham Рік тому +6

      Well to be fair to Udemy courses, consider that you were able to understand this in only 18 minutes because of all the background knowledge on the topic you already have. If you were a newbie, probably a 4 hours would had been necessary to understand the underlaying principles he is using here

    • @8koi245
      @8koi245 Рік тому

      ​@@arhabershamNah

    • @muhammadrizwan4879
      @muhammadrizwan4879 Рік тому

      @@arhabersham indeed broh

  • @CptSauce
    @CptSauce 5 місяців тому

    Used SASS and dropped images in the folder instead of links. Added some more hover effects and my God, amazing. Great tutorial!

  • @unamgege
    @unamgege Рік тому

    Finally I was able to create an easily customizable react slider to showcase my beginner projects, thanks a lot !

  • @ChillWebDeveloper
    @ChillWebDeveloper 6 місяців тому

    aged like a wine. Appreciate what you have done chief!

  • @hiwotina26
    @hiwotina26 Рік тому +1

    Love it when videos are short and useful.

    • @codecommerce
      @codecommerce  Рік тому +1

      Much appreciated! Skipping the fluff!

  • @BhargavTalpada-go3pl
    @BhargavTalpada-go3pl 10 місяців тому

    thank you so much for making this amazing image slider using react & tailwind css

  • @Dreamer_78
    @Dreamer_78 Рік тому

    Ты один из лучших! Здоровья тебе родным и близким. Спасибо бро!

  • @migla2000
    @migla2000 Рік тому +3

    How should I import my own images and not the images from * ?

  • @zeus-yb1ds
    @zeus-yb1ds 2 місяці тому +1

    useEffect(() => {
    const interval = setInterval(() => {
    setCurrentIndex((prevIndex) =>
    prevIndex === slides.length - 1 ? 0 : prevIndex + 1
    );
    }, 7000);
    return () => clearInterval(interval);
    }, [currentIndex, slides.length]);
    Add this for autoslide after 7s...Feel free to edit the interval to desired time.

    • @himydv
      @himydv 2 місяці тому

      thanks bro

    • @zeus-yb1ds
      @zeus-yb1ds 2 місяці тому

      @@himydv you're welcome

  • @iLuliBest
    @iLuliBest Рік тому

    Thank you so much! Finally a clean and easy to read slider. 🙌🏼

  • @thebigbangcoder
    @thebigbangcoder Рік тому +1

    Thank you so much

  • @ANAS4TOSTOBOY
    @ANAS4TOSTOBOY Рік тому +2

    thanks

  • @carloschinyuku
    @carloschinyuku Рік тому

    Powerful and amazing stuff, love it. Thanks, for the energy you put into these tutorials, very easy to follow and understand. Keep it up bro.

  • @akhatorosakhogba2993
    @akhatorosakhogba2993 4 місяці тому

    This is a really clever tutorial .

  • @ivanperez5231
    @ivanperez5231 4 місяці тому

    Thank you so much. Great addition to my client's website.

  • @hookahthetravellingmonk
    @hookahthetravellingmonk Рік тому +1

    Very good tutorial. I'm using the current next 13 and this works perfctly.

  • @muhammadmursalin8915
    @muhammadmursalin8915 7 місяців тому

    Excellent explained. Great work, go on💐💐

  • @liuyan8066
    @liuyan8066 Рік тому

    Glad to learn everything about Tailwind CSS! Thanks!

  • @asifzulfiqar2517
    @asifzulfiqar2517 Рік тому +2

    How to add a timer in it?

  • @kirovreporting6767
    @kirovreporting6767 Рік тому

    I had to login just to give proper props to you.
    It's incredible how much useful information we had in this video.
    Excellent didactic, straight to the point, I didn't even had to 2x the video speed - since most of YT like to waste a lot of our time with gimmick.
    props={toYou}

  • @onar1261
    @onar1261 Рік тому

    Thank you man, very helpful and elegant solution

  • @1222medi
    @1222medi 2 місяці тому

    this is simpe and effective thank you so much !

  • @SaikotRoy-wb3go
    @SaikotRoy-wb3go 5 місяців тому

    It was really simple and amazing video

  • @antumallick1468
    @antumallick1468 4 місяці тому +1

    Great Job Man!❤

  • @abedalraoufzeidan1461
    @abedalraoufzeidan1461 11 місяців тому

    awesome tutorial highly recomended i got here from bard sugesstion

  • @gatti311
    @gatti311 Рік тому

    Thank you for this video, this will help a lot. These kinds of videos are really useful. It would be nice if you continue with these kinds of videos, where you just make some cool and modern component/part of the website.

  • @refadhile
    @refadhile Рік тому +1

    men thankyou, you are a hero

  • @Calathea-Z
    @Calathea-Z Рік тому

    Really appreciated your video. Very helpful information! Great explanation!

  • @emanuelmanrique9944
    @emanuelmanrique9944 Рік тому

    It looks amazing, thanks!

  • @Nanashi-rq7lk
    @Nanashi-rq7lk Рік тому +1

    Nice Video. This video is helpful for me

  • @Deepak-i9r8i
    @Deepak-i9r8i Рік тому

    Ohh Bro
    U never disappoint, whenever I want to see something about react or Next js.. I find everything here😂❤

  • @jovanagluhovic3139
    @jovanagluhovic3139 Рік тому +1

    Thank you very much sir. Great video. :)))

  • @ltd5480
    @ltd5480 Рік тому +1

    How did the transitions work? I’m using local files and how can I make that transition?

  • @youngun550
    @youngun550 Рік тому

    Very cool, thanks so much for this great video!

  • @tiagolourinho2638
    @tiagolourinho2638 7 місяців тому

    You saved my day! Thx!

  • @danielflick3707
    @danielflick3707 Рік тому +1

    how can i change the color of the active dot?

  • @harihardhik3293
    @harihardhik3293 5 місяців тому

    very well explained

  • @seun.daniel.omatsola
    @seun.daniel.omatsola Рік тому

    Thanks a lot. This has helped me a lot

  • @skreddysasi3404
    @skreddysasi3404 Рік тому

    Thanks for Sharing 🚀🔥

  • @Deus-lo-Vuilt
    @Deus-lo-Vuilt Рік тому

    Nice , love tailwind and react

    • @codecommerce
      @codecommerce  Рік тому

      Hard to go back to writing out css haha

  • @thisiskartik
    @thisiskartik Рік тому

    Really HelpFul Thanks A lot

  • @lawrencemichael5571
    @lawrencemichael5571 Рік тому

    This is really great but I was hoping you'd also include code to allow the dots to show where we are.

  • @Metovski
    @Metovski Рік тому

    I like to watch short useful videos like that. I can create my own slider :D Thanx

  • @muhammadhabiburrahman3372
    @muhammadhabiburrahman3372 Рік тому

    its really cool brother

  • @andreasiano5953
    @andreasiano5953 11 місяців тому

    How did you add that smooth sliding when you press on the arrow?? Is it a tailwind class?

  • @cgrbasantff8748
    @cgrbasantff8748 Рік тому

    really really amazingvideo ever i see on youtube related carousel

  • @heliolucio7691
    @heliolucio7691 Рік тому +1

    Thank you!

  • @AKPist
    @AKPist 7 місяців тому

    what if I want to use images instead of url?
    This gave me errors:

  • @iammtander
    @iammtander Рік тому

    🚀🚀🚀 09:30
    You rock, man!!

  • @wenceslaoavalos9643
    @wenceslaoavalos9643 Рік тому

    Really helpful!

  • @rilynnaisa2942
    @rilynnaisa2942 Рік тому

    Thank you for the tutorial! Very useful :D

  • @hubesh716
    @hubesh716 Рік тому +5

    sir plz make Ecommerce project with Tailwind css and Redux toolkit for state management and firebase for backend plz sir its my request..plz sir
    Ecommerce project like Amazone better ui design many things plz sir

    • @Metovski
      @Metovski Рік тому +1

      Yes bro we want Tailwind & redux tool kit e commerce project.

    • @iammtander
      @iammtander Рік тому

      True it is. @Code Commerce : A special request sir!!. React, redux tailwind with firebase as backen

    • @konradja4310
      @konradja4310 Рік тому

      +1 guys :D

    • @iv9iv9
      @iv9iv9 Рік тому

      That'd be nice

    • @yahyamohamoud7290
      @yahyamohamoud7290 Рік тому

      that would be good but with context API and not Redux

  • @DevanshuAugusty
    @DevanshuAugusty Місяць тому

    about the dots, what if there are 100 images?

  • @VictorYazigi
    @VictorYazigi 6 місяців тому

    is there a way for me to make the image shrink when i use it on mobile? it always fits 100% of the carousel div but i can't see the whole image

  • @PeriklesPeriklesoglu
    @PeriklesPeriklesoglu Рік тому

    thank you

  • @juanhedderich
    @juanhedderich Рік тому

    Hey dude, great video, learned a lot, but I have a question. Why make divs with the cursor-pointer class when you can just make buttons?

  • @psyferinc.3573
    @psyferinc.3573 Рік тому

    awesome man thank s

  • @alihamoud6863
    @alihamoud6863 Рік тому

    it is very useful, thanks sir.

  • @omageprosper9673
    @omageprosper9673 Рік тому +1

    why didn't you use vite to setup your react project?

  • @abdulahad1571
    @abdulahad1571 Місяць тому

    Lovely 😍

  • @VietTranIT
    @VietTranIT Рік тому +1

    Sleek. Thanks for the great tutorial.

  • @CJTHEGAMER
    @CJTHEGAMER Рік тому +1

    There's a way i can make the slides move automatically?

    • @lindsayaiello501
      @lindsayaiello501 Рік тому

      I second this. Trying to figure out how to auto slide. Any luck yet?

  • @oppranto
    @oppranto Рік тому

    Can you please explain the logic inside those two button?

  • @gousiyaart2515
    @gousiyaart2515 Рік тому

    How use backend url
    Therefore not working in background image current index
    Please reply

  • @nogafouz2174
    @nogafouz2174 Рік тому

    thanks for this video very useful😀

  • @rudrajoshi1948
    @rudrajoshi1948 Рік тому +1

    I have a question if I want to make it slide on it's own then what changes can I do in the code?? I mean auto play along with buttons too

    • @navinkumarsahu1159
      @navinkumarsahu1159 Рік тому +1

      one simple trick would be to use setInterval function

    • @rudrajoshi1948
      @rudrajoshi1948 Рік тому

      @@navinkumarsahu1159 Thanks

    • @navinkumarsahu1159
      @navinkumarsahu1159 Рік тому +1

      @@rudrajoshi1948 Just use swiper js and don't forget to import AutoPlay and add it to the modules array

  • @hengratanak7633
    @hengratanak7633 Рік тому

    thank you alot

  • @zakariaowen
    @zakariaowen Рік тому

    Very useful

  • @Mirrasim
    @Mirrasim Рік тому

    Thank you, you good

  • @betterbehappythannot3605
    @betterbehappythannot3605 Рік тому

    Not connected to the video, but what freelance websites did you use to offer your services?

  • @mohamadrezakazemian5220
    @mohamadrezakazemian5220 Рік тому

    great video.

  • @oretasletters
    @oretasletters Рік тому +6

    Bro forgot to give us the animation🙂

  • @try-b2k
    @try-b2k Рік тому

    How can we add autoplay

  • @ltd5480
    @ltd5480 Рік тому

    Can I use instead to create that transition?

  • @jameskeita9657
    @jameskeita9657 Рік тому

    thank u so much bro for u video & do u have video react with redux?

    • @codecommerce
      @codecommerce  Рік тому

      Thank you James - I haven't made a video with redux yet. I am looking to do that soon with a project.

    • @jameskeita9657
      @jameskeita9657 Рік тому

      ​@@codecommerce i will wait and it will be a good experience both for me and for others

  • @rafaelventura9819
    @rafaelventura9819 Рік тому

    Excelent 👋

  • @mehrdadmousavi9144
    @mehrdadmousavi9144 Рік тому

    It was great :))
    I have a question, suppose we have 4 SVGs instead of slides state, how can we loop through and show them?

    • @Smartercow
      @Smartercow Рік тому

      What do you mean with SVG's instead of slides state? SVG is still an image.

    • @mehrdadmousavi9144
      @mehrdadmousavi9144 Рік тому

      @@Smartercow In the video we have some unsplash links that he loop (map) them, I say suppose that we have 5 files (Svg, Jpg, ..) how can we loop and show them?

    • @Smartercow
      @Smartercow Рік тому

      @@mehrdadmousavi9144 I suppose you have those 5 files local(your pc). You put them in images folder in the public folder: /public/images - but instead of the unsplash link, you use the file path without /public like this:
      /images/your_image_1.svg
      /images/your_image_2.svg
      /images/your_image_3.svg
      /images/your_image_4.svg
      /images/your_image_5.svg

    • @mehrdadmousavi9144
      @mehrdadmousavi9144 Рік тому

      @@Smartercow Thank you so much, I'll try it

  • @talhatahir461
    @talhatahir461 Рік тому

    Please react video carousel.. there are many videos of image slider.. but a few and old videos of video slider

  • @peterrizek8774
    @peterrizek8774 Рік тому

    How can i type in two tags at the same time ? like at 7:29

    • @codecommerce
      @codecommerce  Рік тому

      Hold down control or alt. One of those… lol

  • @nahomfikadu
    @nahomfikadu Рік тому +1

    It is not clear to see the codes

  • @suraj4522
    @suraj4522 8 місяців тому

    Build a react image slider with your gym trainer

  • @juanpischetz4053
    @juanpischetz4053 Рік тому

    I want to make a contribution, can I? make a few additions to make it reusable.

  • @netsaosa4973
    @netsaosa4973 Рік тому

    curosr

  • @jeetsikder5912
    @jeetsikder5912 Рік тому

    Awesome video sir

  • @rorodriguez5358
    @rorodriguez5358 4 місяці тому

    thank you!

  • @user-cat848
    @user-cat848 8 місяців тому

    thankyou

  • @mdwaliullah9609
    @mdwaliullah9609 5 місяців тому

    thanks