Tailwind & JavaScript Project - Products Filtering UI
Ғылым және технология
In this project, we will create a product list using Tailwind CSS, and we will add filtering and add-to-cart functionality with JavaScript.
Code:
codepen.io/bradtraversy/pen/o...
20 Projects Course:
www.traversymedia.com/20-Vani...
Vanilla Projects Repo:
github.com/bradtraversy/vanil...
Blog Post:
www.traversymedia.com/blog/pr...
0:00 - Intro
2:02 - Start The HTML
4:35 - Navbar / Search Area
9:00 - Main Products & Categories Area
14:26 - Hardcode HTML Items
19:30 - Start The JavaScript
20:25 - Select DOM Elements & Init
22:42 - Loop Over Products & Create Elements
27:53 - Refactor To Function
29:22 - Update Cart Item Count
35:23 - Filter Products
Пікірлер: 44
Just for the note, I'm not beginner in web development, quite experienced, but i still love your work on VanillaJS. Thanks for supporting multiple technologies for years
2.2M Subscribers 968 Videos No clickbait or OMG drama... But a 5 second, off-hand remark about "Case Preserving Multiple Cursors"? PRICELESS!
@andreea34
2 ай бұрын
LOL Yeeess!! I looked it up as soon as he mentioned it. Saves sooooo much time! 😆
Brad is one of the few Developers I am always keen to learn from. Each time a new technology comes, I usually wonder how he will tackle it. The man has range in his understanding of the web.
Hey Brad, I just finished your recent Next14 course. Good stuff, thanks!!
Would love to see a React version with a backend data store. Thanks for the fast-paced tutorials. Always learn a lot.
Just completed! Thanks Brad! Given your new video on React 19, it could be cool to see a version of this project in React 19 when it releases that explores some of the new changes / features.
Thank you Brad. 🥂
Awesome stuff! Would loved to see this in Vue
Just finished your React course and wanted to practice my skills by making a filter component with pills and search for a large async list. This’ll come in handy if I get stuck/need inspiration. Thanks Brad!
Thanks again very much.
Hi Brad, thanks for this video. Is this also added to the udemy projects course?
Thank-you very much.
thanks Brad, very timely, i need something like this to display my coin hunting finds, i don't use frameworks so i will have to use vanilla CSS.
Thank you
A Svelte 5 (after it's released) version of this would be awesome :)
Would be great to see in SolidJS.
We need a new redux toolkit course with build website, please. thanks for all works brad
Is there a simple way to allow for each product to have multiple categories like tags?
great project thanks!! can you make this project with MERN stack project also with ts
Hey there brad , can you make it real world website like connect it with database . we as beginners just follow along the projects and dont get the idea how things actually work.
Thanks for this video. I learned JS mostly from your videos. Am wondering If this is the time to move to new Gen ai, and learn NLP LLM etc.. Please advise..
@harihoodibaba
2 ай бұрын
kzread.info/dash/bejne/qp97yrCqhsSXhtY.htmlsi=zNRNjaKf6s_OCxkb Sorry got the answer from you already. Thanks
Is there a coupon for this course? ;)
Lets's say i am using tailwind css. So why do i need to add extra classList.add()? I could just directly paste any tailwind component in the div.innerHTML or write my own like Hey right?
@andreea34
2 ай бұрын
@mohammadfazlerabbi7712 Yes, of course you could write your own component instead, but in that case you will need to write some extra CSS rules to style your custom classes. Brad is adding existing Tailwind classes in order to avoid writing extra CSS :) But, yes, you can insert custom code as needed. Remember there is always more than one way to do things in JavaScript.
@mohammadfazlerabbi7712
2 ай бұрын
@@andreea34 yeah i got your point Thanks 😀
Please make this kind of project using laravel and React using inertia.js. there are no more free resources doing that specially laravel and react. love your tuts btw.
Yes we are interested lets build it using react or nextjs please sir
Love to learn same project in react
with react it would be perfect
Please do the react or node js version
I didn't understand why we are adding the "add" class to the counter button. Can anyone explain ??
@andreea34
2 ай бұрын
@umairulislam9048 The class "added" is used to keep track of which buttons have already been clicked on (or which products have already been "added to card"). Since buttons are elements that can't store information about user events, they need to be tagged in some way when the user clicks on them. This tag can then be used in a conditional JS statement to check if the buttons have already been clicked on. This essentially turns the buttons into checkboxes from a JS point of view, if that makes sense (checked/unchecked). Of course, it's not necessary to use the class name "added" to check the button status, you could use one of the existing Tailwind classes on the button if you prefer (like the bg-red-600 class for example), or you could use a custom HTML property instead, like data-added-to-cart="true", etc. But using a class name is the simplest way to do this. Hope all that makes sense!
@umairulislam9048
2 ай бұрын
@@andreea34 Thanks I got it
Please do with React projects
@top5-vid814
2 ай бұрын
u rock buddy
Hello sir, I want to learn the web from scratch, but I do not know how to contact you
Is that a VS Code Theme or custom? =).
@TheNarancia
2 ай бұрын
Should be github dark theme
Do it in react
@danish7335
2 ай бұрын
it will be easy
Please create the same but with Vue js
Really tired with all the frameworks.. nothing beats a simple project without any of the bs 💩