Build a React Image Slider with Tailwind CSS

Поделиться
HTML-код
  • Опубликовано: 18 янв 2025

Комментарии • 143

  • @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

  • @vitorac412
    @vitorac412 Год назад +37

    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 Год назад

      "use client"@@Darkah

  • @GiantSquid13
    @GiantSquid13 Год назад +2

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

  • @sumanthprabhu11
    @sumanthprabhu11 2 года назад +6

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

  • @nixonmbeki5690
    @nixonmbeki5690 5 месяцев назад +2

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

  • @mtsurov
    @mtsurov 2 года назад +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 2 года назад +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

  • @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

  • @unamgege
    @unamgege Год назад

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

  • @thebigbangcoder
    @thebigbangcoder Год назад +1

    Thank you so much

  • @CptSauce
    @CptSauce 6 месяцев назад

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

  • @hiwotina26
    @hiwotina26 2 года назад +1

    Love it when videos are short and useful.

    • @codecommerce
      @codecommerce  2 года назад +1

      Much appreciated! Skipping the fluff!

  • @ChillWebDeveloper
    @ChillWebDeveloper 8 месяцев назад

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

  • @semireolatunde-salawu758
    @semireolatunde-salawu758 3 дня назад

    Really great help in implementing for my project!

  • @antumallick1468
    @antumallick1468 6 месяцев назад +1

    Great Job Man!❤

  • @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.

  • @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}

  • @BhargavTalpada-go3pl
    @BhargavTalpada-go3pl Год назад

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

  • @emanuelmanrique9944
    @emanuelmanrique9944 Год назад

    It looks amazing, thanks!

  • @onar1261
    @onar1261 Год назад

    Thank you man, very helpful and elegant solution

  • @iLuliBest
    @iLuliBest Год назад

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

  • @liuyan8066
    @liuyan8066 2 года назад

    Glad to learn everything about Tailwind CSS! Thanks!

  • @ANAS4TOSTOBOY
    @ANAS4TOSTOBOY Год назад +2

    thanks

  • @1222medi
    @1222medi 3 месяца назад

    this is simpe and effective thank you so much !

  • @Calathea-Z
    @Calathea-Z Год назад

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

  • @muhammadmursalin8915
    @muhammadmursalin8915 9 месяцев назад

    Excellent explained. Great work, go on💐💐

  • @refadhile
    @refadhile Год назад +1

    men thankyou, you are a hero

  • @tiagolourinho2638
    @tiagolourinho2638 9 месяцев назад

    You saved my day! Thx!

  • @seun.daniel.omatsola
    @seun.daniel.omatsola 2 года назад

    Thanks a lot. This has helped me a lot

  • @SaikotRoy-wb3go
    @SaikotRoy-wb3go 7 месяцев назад

    It was really simple and amazing video

  • @zeus-yb1ds
    @zeus-yb1ds 4 месяца назад +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 3 месяца назад

      thanks bro

    • @zeus-yb1ds
      @zeus-yb1ds 3 месяца назад

      @@himydv you're welcome

  • @youngun550
    @youngun550 Год назад

    Very cool, thanks so much for this great video!

  • @akhatorosakhogba2993
    @akhatorosakhogba2993 5 месяцев назад

    This is a really clever tutorial .

  • @Dreamer_78
    @Dreamer_78 Год назад

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

  • @iammtander
    @iammtander 2 года назад

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

  • @thisiskartik
    @thisiskartik Год назад

    Really HelpFul Thanks A lot

  • @asifzulfiqar2517
    @asifzulfiqar2517 Год назад +2

    How to add a timer in it?

  • @ivanperez5231
    @ivanperez5231 6 месяцев назад

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

  • @Nanashi-rq7lk
    @Nanashi-rq7lk Год назад +1

    Nice Video. This video is helpful for me

  • @jovanagluhovic3139
    @jovanagluhovic3139 Год назад +1

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

  • @hookahthetravellingmonk
    @hookahthetravellingmonk Год назад +1

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

  • @rilynnaisa2942
    @rilynnaisa2942 2 года назад

    Thank you for the tutorial! Very useful :D

  • @skreddysasi3404
    @skreddysasi3404 Год назад

    Thanks for Sharing 🚀🔥

  • @migla2000
    @migla2000 Год назад +3

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

  • @Deus-lo-Vuilt
    @Deus-lo-Vuilt 2 года назад

    Nice , love tailwind and react

    • @codecommerce
      @codecommerce  2 года назад

      Hard to go back to writing out css haha

  • @harihardhik3293
    @harihardhik3293 6 месяцев назад

    very well explained

  • @gatti311
    @gatti311 2 года назад

    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.

  • @abdulahad1571
    @abdulahad1571 3 месяца назад +1

    Lovely 😍

  • @andreasiano5953
    @andreasiano5953 Год назад

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

  • @heliolucio7691
    @heliolucio7691 Год назад +1

    Thank you!

  • @ltd5480
    @ltd5480 2 года назад +1

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

  • @muhammadhabiburrahman3372
    @muhammadhabiburrahman3372 Год назад

    its really cool brother

  • @abedalraoufzeidan1461
    @abedalraoufzeidan1461 Год назад

    awesome tutorial highly recomended i got here from bard sugesstion

  • @psyferinc.3573
    @psyferinc.3573 Год назад

    awesome man thank s

  • @omageprosper9673
    @omageprosper9673 Год назад +1

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

  • @wenceslaoavalos9643
    @wenceslaoavalos9643 2 года назад

    Really helpful!

  • @cgrbasantff8748
    @cgrbasantff8748 2 года назад

    really really amazingvideo ever i see on youtube related carousel

  • @alihamoud6863
    @alihamoud6863 2 года назад

    it is very useful, thanks sir.

  • @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?

  • @danielflick3707
    @danielflick3707 Год назад +1

    how can i change the color of the active dot?

  • @Metovski
    @Metovski 2 года назад

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

  • @nogafouz2174
    @nogafouz2174 2 года назад

    thanks for this video very useful😀

  • @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

  • @VietTranIT
    @VietTranIT Год назад +1

    Sleek. Thanks for the great tutorial.

  • @Deepak-i9r8i
    @Deepak-i9r8i Год назад

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

  • @DevanshuAugusty
    @DevanshuAugusty 2 месяца назад

    about the dots, what if there are 100 images?

  • @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?

  • @betterbehappythannot3605
    @betterbehappythannot3605 2 года назад

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

  • @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 2 года назад

    thank you alot

  • @jeetsikder5912
    @jeetsikder5912 Год назад

    Awesome video sir

  • @Mirrasim
    @Mirrasim 2 года назад

    Thank you, you good

  • @zakariaowen
    @zakariaowen 2 года назад

    Very useful

  • @AnilKumar-sz8su
    @AnilKumar-sz8su Месяц назад +1

    nice

  • @oppranto
    @oppranto Год назад

    Can you please explain the logic inside those two button?

  • @sryazigi
    @sryazigi 8 месяцев назад

    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

  • @mohamadrezakazemian5220
    @mohamadrezakazemian5220 2 года назад

    great video.

  • @lawrencemichael5571
    @lawrencemichael5571 Год назад

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

  • @AKPist
    @AKPist 9 месяцев назад

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

  • @ltd5480
    @ltd5480 2 года назад

    Can I use instead to create that transition?

  • @rafaelventura9819
    @rafaelventura9819 Год назад

    Excelent 👋

  • @mehrdadmousavi9144
    @mehrdadmousavi9144 2 года назад

    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 2 года назад

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

    • @mehrdadmousavi9144
      @mehrdadmousavi9144 2 года назад

      @@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 2 года назад

      @@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 2 года назад

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

  • @gousiyaart2515
    @gousiyaart2515 Год назад

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

  • @try-b2k
    @try-b2k Год назад

    How can we add autoplay

  • @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

  • @hubesh716
    @hubesh716 2 года назад +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 2 года назад +1

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

    • @iammtander
      @iammtander 2 года назад

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

    • @konradja4310
      @konradja4310 2 года назад

      +1 guys :D

    • @iv9iv9
      @iv9iv9 2 года назад

      That'd be nice

    • @yahyamohamoud7290
      @yahyamohamoud7290 2 года назад

      that would be good but with context API and not Redux

  • @oretasletters
    @oretasletters Год назад +6

    Bro forgot to give us the animation🙂

  • @nahomfikadu
    @nahomfikadu Год назад +1

    It is not clear to see the codes

  • @talhatahir461
    @talhatahir461 2 года назад

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

  • @suraj4522
    @suraj4522 9 месяцев назад

    Build a react image slider with your gym trainer

  • @juanpischetz4053
    @juanpischetz4053 2 года назад

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

  • @netsaosa4973
    @netsaosa4973 2 года назад

    curosr

  • @rorodriguez5358
    @rorodriguez5358 6 месяцев назад

    thank you!

  • @user-cat848
    @user-cat848 9 месяцев назад

    thankyou

  • @mdwaliullah9609
    @mdwaliullah9609 7 месяцев назад

    thanks