8 TailwindCSS Classes I Wish I Found Earlier

  Рет қаралды 70,701

Tom Is Loading

Tom Is Loading

Күн бұрын

Animated UI components for React, Tailwind CSS, Framer Motion & More ✨ www.hover.dev
TailwindCSS is an amazing tool, and one of the best parts is it's easy learning curve. Type in a style with a tailwind intellisense extension installed, and you'll more than likely find the class you're looking for.
BUT, Tailwind ALSO provides a number of utility classes that go beyond your normal CSS styles.
Today, we'll talk about a number of these classes that I wish I'd found MUCH earlier... okay, plus a few basic CSS options which I somehow never learned until bumping into them with tailwind 😂
#tailwindcss #webdevelopment
📚 Video Links
Source code: gist.github.com/TomIsLoading/...
🔗 My Links
TikTok: / tomisloading
Instagram: / tomisloading
GitHub: github.com/TomIsLoading
Twitter: / tomisloading
Discord & more: linktr.ee/tomisloading
Portfolio templates: tomisloading.gumroad.com/
0:00 - Introduction
0:11 - Divide
0:48 - Scroll snap
1:31 - sr-only
2:07 - Accent color
2:30 - Caret styling
3:02 - You can do more with gradients
3:38 - Animations
3:56 - Gap, but without gap

Пікірлер: 92
@tomisloading
@tomisloading 4 ай бұрын
Are a couple of these kinda just basic CSS? Yes. Did I somehow never know about them until accidentally finding them with TW intellisense? Also yes. Show me a man who say’s he knew you could style input cursors and I’ll show you a liar 👨
@aguywithoutaname
@aguywithoutaname 3 ай бұрын
This is one of those videos that I don't think I need until I start watching and then I can't close it. No amount of docs reading would give me this information. You did well man !
@0xAndy
@0xAndy 4 ай бұрын
1:31 Instead of sr-only for the buttons, you could add aria-label="the text" which would accomplish the same thing without inserting more nodes into the DOM.
@tomisloading
@tomisloading 4 ай бұрын
Very true! I like sr-only when I want to also show the text at specific break points, essentially as an alternative to display none. Also useful for text that’s ACTUALLY only for screen readers, or things like custom toggles/switches/checkboxes
@8YEight
@8YEight 4 ай бұрын
A sr-only text should be preferred over an aria-label whenever possible. Screen reader software is not required to support the ARIA standard so there’s an always a risk that these attributes are not supported.
@rahulxcr
@rahulxcr 4 ай бұрын
Loved the video. Very helpful classes.
@Blade_Dhruv
@Blade_Dhruv 4 ай бұрын
absolutely time saving and informative
@ppcalpha1042
@ppcalpha1042 4 ай бұрын
you have the best videos dude!!!
@mdmnbp1183
@mdmnbp1183 4 ай бұрын
Ur good at explaining, will watch the video later thanks
@farizsofyan
@farizsofyan 4 ай бұрын
I just discovered gradient last month and i got mindblowing, how cool implementation is it 🤯 The other thing i discovered was custom class to assign new css variable
@prateek5668
@prateek5668 4 ай бұрын
Very Helpful!!!
@madukomablessed4712
@madukomablessed4712 4 ай бұрын
Didn’t know about divide and scroll snap, nice one
@loground
@loground 4 ай бұрын
legend, love your videos
@Deus-lo-Vuilt
@Deus-lo-Vuilt 3 ай бұрын
Thanks , I love Tailwind ❤
@CodeWithSasha
@CodeWithSasha 4 ай бұрын
Thanks! Great video
@Ony3dika
@Ony3dika 4 ай бұрын
Absolutely love this video, will mostly likely be using the space between property a lot!
@tomisloading
@tomisloading 4 ай бұрын
It's SO useful :)
@gadoosher
@gadoosher 4 ай бұрын
Hey@@tomisloading ! This was a killer video, will definitely be checking out more of your stuff. What's the benefit of space between as opposed to using gap? Cheers!
@tomisloading
@tomisloading 4 ай бұрын
@@gadoosher Just that you don't have to add flex or grid! Generally advised to use gap for complex use cases though. Space between essentially just adds margin to all but the first element in the group. Wrapping elements and grid won't play well with space
@gadoosher
@gadoosher 4 ай бұрын
oh doi lmao. Good call 😅@@tomisloading
@Omar_Al_Seddik
@Omar_Al_Seddik 4 ай бұрын
I honestly don't get the point. Why not just use gap?
@mdmnbp1183
@mdmnbp1183 4 ай бұрын
gaps classes are so useful 👍
@Harmxn
@Harmxn 4 ай бұрын
space is a big one. I was always making Flex boxes and adding a Gap.
@wyndmill
@wyndmill 4 ай бұрын
this is a great video your pacing is perfect
@tomisloading
@tomisloading 4 ай бұрын
THANK YOU! Feel like I finally found the right balance of not completely blabbering and actually explaining what I'm doing 😂
@chiroyce
@chiroyce 4 ай бұрын
Small world we live in!
@bhavishs5830
@bhavishs5830 4 ай бұрын
This is awesome
@itzzRaghav
@itzzRaghav 4 ай бұрын
Great video
@ronitgurjar5747
@ronitgurjar5747 4 ай бұрын
Oh 🔥🔥🔥hey Tom, i see the loading family has grown quite big🔥🔥🔥 congrats man🗿🍷
@tomisloading
@tomisloading 4 ай бұрын
Thank you!!! A bit more every day 😁
@deatho0ne587
@deatho0ne587 4 ай бұрын
Tailwind is CSS in the DOM, just like inline styles. Issue I see is the graident you have at 3:34 most likely would be in more than one place in your project, so just make a CSS class for it.
@ChristoferGBG
@ChristoferGBG 4 ай бұрын
It's beyond insane that anyone with more the six months experience of frontend would even consider tailwind. As you say, inline styling
@deatho0ne587
@deatho0ne587 4 ай бұрын
There are reasons for it, just like there are reasons for Bootstrap. I personally like most projects to have their own CSS that is a cross of Bootstrap, Tailwind and others. Most of time it is compent level (bootstrap) but when you need a slight variantion (tailwind) there should be a few in the repo that everyone can use.
@thecoolnewsguy
@thecoolnewsguy Ай бұрын
​@@ChristoferGBGnah it eases development and have many pre made classes
@HamadAbdulla_7
@HamadAbdulla_7 4 ай бұрын
Thank you
@Deus-lo-Vuilt
@Deus-lo-Vuilt 3 ай бұрын
Thanks , Tailwind ❤
@zerosandones7547
@zerosandones7547 4 ай бұрын
what. does divide (in 0:45), work with table rows as well?
@lollery3253
@lollery3253 4 ай бұрын
what font are you using? looks good!
@tomisloading
@tomisloading 4 ай бұрын
Poppins! :)
@joshua_226
@joshua_226 4 ай бұрын
Shiiiee this is f-ing cool
@bipinthomas6695
@bipinthomas6695 4 ай бұрын
please make the playlist
@AzirChai
@AzirChai 4 ай бұрын
Hey! Nice video! Learned alot, also for the example with the accent color box thing, you used "h-8 w-8" thats totally fine, but you can use "size-8" its the same but both in 1, its handy for boxes / squares / circles, just wanted to mention it! Nice video again!
@tomisloading
@tomisloading 4 ай бұрын
WOAH I did not know that!!! If ever make a follow up to this video, I’ll be adding this 😂
@a7mdbest15
@a7mdbest15 4 ай бұрын
ok, i only know the space between, every thing else is just new to me
@hichambronson6533
@hichambronson6533 4 ай бұрын
Sr-only is too hacky, why add a whole span element and hide it? You can just add an aria-label to those buttons, which is considered best practice.
@DarlantenCaten
@DarlantenCaten 3 ай бұрын
Its just an example. There are many valid cases where an element is useful only for screen reader users.
@bozzhik
@bozzhik 4 ай бұрын
yo very good video
@352Pking
@352Pking 4 ай бұрын
Violet600:wave: buying purple partyhat
@tomisloading
@tomisloading 4 ай бұрын
Comment of the year
@joshuadeguzman2911
@joshuadeguzman2911 2 ай бұрын
What about the peer?
@RikasMohomed
@RikasMohomed 4 ай бұрын
Thanks
@tomisloading
@tomisloading 4 ай бұрын
Happy to help!
@itsdrvgo
@itsdrvgo 4 ай бұрын
I only knew about space-x/y... XD
@Patrick-pu5di
@Patrick-pu5di 4 ай бұрын
as someone who doesnt use tailwind everything about this looks fucking insane like....WHATT!!
@thecoolnewsguy
@thecoolnewsguy Ай бұрын
I was also like this but once you get used to it, you'll become addicted
@doren_dev
@doren_dev 4 ай бұрын
Cool
@fmgthoryt8859
@fmgthoryt8859 3 ай бұрын
2:23 instead of w-8 h-8 use size-8.
@godofwar8262
@godofwar8262 4 ай бұрын
I am also a noob who doesn't know these features 😂 and also please make a video on best practices of tailwind css in code means a beginner level to pro level real example
@tomisloading
@tomisloading 4 ай бұрын
I've been coding for ~6 years and somehow JUST FOUND OUY CAN STYLE THE CARET OF AN INPUT?!?!? Amazing 😂
@jkibble98
@jkibble98 4 ай бұрын
@@tomisloading to be fair it's still relatively new. There are tons of newish well supported CSS features which most people don't know. The discoverability of these is a huge reason people love Tailwind
@nathnaelgetachew7379
@nathnaelgetachew7379 4 ай бұрын
What i want to know is how to order my classes😢
@tomisloading
@tomisloading 4 ай бұрын
Prettier plug-in for tailwind does it automatically :)
@moneyfr
@moneyfr 4 ай бұрын
i made a tailwind killer with unocss can i send to you ?
@thecoolnewsguy
@thecoolnewsguy Ай бұрын
But it hasn't killed tailwind yet
@moneyfr
@moneyfr Ай бұрын
@@thecoolnewsguy try you ll
@Munch_92
@Munch_92 4 ай бұрын
Webdevsimplified quite simply robbed your video champ.
@tomisloading
@tomisloading 4 ай бұрын
Hahaha he seems like a good dude, I’m sure he didn’t take it 🙂 And we’re all just trying to share knowledge out here anyways, he’s got 150x the audience I do, if he can help 150X the people that’s fine with me!
@guuhuu1337
@guuhuu1337 4 ай бұрын
"I Wish I Found Earlier" - just open the docs
@aiyazmostofa1501
@aiyazmostofa1501 4 ай бұрын
You have read the docs of every library you have ever used?
@temitopedavid9508
@temitopedavid9508 4 ай бұрын
Ungrateful guy
@tiagocerqueira9459
@tiagocerqueira9459 4 ай бұрын
Do you check every item in amazon when shopping?
@lufenmartofilia5804
@lufenmartofilia5804 4 ай бұрын
​@@aiyazmostofa1501to be honest the docs of tailwind is small and easy to navigate
@invinciblemode
@invinciblemode 4 ай бұрын
@@aiyazmostofa1501yes I do
@thatanimeweirdo
@thatanimeweirdo 4 ай бұрын
Good video, but by god do I hate tailwind
@tomisloading
@tomisloading 4 ай бұрын
Hahaha, I know it’s tough to look at at first, but it’s amazing once you get over your first reaction to it imo!
@thatanimeweirdo
@thatanimeweirdo 4 ай бұрын
@@tomisloading I've used it for about a year in an existing project, it's just something where the cons outweigh the pros for me, even when understanding all the concepts and knowing all the utility classes. I did however apply tailwind's concept of color variables since then (primary-50 to 950 and so on), so there was a net positive learning it and getting familiar with it in a professional level.
@tomisloading
@tomisloading 4 ай бұрын
@@thatanimeweirdo haha fair enough! The color system is super nice for sure :)
@Hadi-gd7ul
@Hadi-gd7ul 4 ай бұрын
Remember kids, stay away from margin, always use padding or gap
@troublesum
@troublesum 4 ай бұрын
why?
@Hadi-gd7ul
@Hadi-gd7ul 4 ай бұрын
@@troublesum just don't, you're welcome
@paragateoslo
@paragateoslo 4 ай бұрын
Depends. If you want even spacing use gap, if you need different use margin.
@hoorahforsnakes
@hoorahforsnakes 4 ай бұрын
What terrible advice. Gap only applies to flexible element layouts, and also has some drawbacks in niche scenarios that i won't get into the specifics of. And padding applies the spacing in the inside of an element instead of the outside, which will cause issues if your elements have backgrounds or borders
@Hadi-gd7ul
@Hadi-gd7ul 4 ай бұрын
Also remember kids, always use flex@@hoorahforsnakes
@MarkSnape
@MarkSnape 4 ай бұрын
Sorry, can't get past having to read "className"
@avwie132
@avwie132 4 ай бұрын
Don’t fucking blur them man
@darlleybrito4198
@darlleybrito4198 4 ай бұрын
Group, Peer, Size, *:,
@tomisloading
@tomisloading 4 ай бұрын
💯
@darlleybrito4198
@darlleybrito4198 4 ай бұрын
@@tomisloading there are examples of peer classes in WindUI
I WISH I Knew These Tailwind Tips Earlier
9:15
Theo - t3․gg
Рет қаралды 171 М.
10 Tailwind Classes I Wish I Knew Earlier
13:31
Web Dev Simplified
Рет қаралды 166 М.
Пробую самое сладкое вещество во Вселенной
00:41
터키아이스크림🇹🇷🍦Turkish ice cream #funny #shorts
00:26
Byungari 병아리언니
Рет қаралды 26 МЛН
THEY WANTED TO TAKE ALL HIS GOODIES 🍫🥤🍟😂
00:17
OKUNJATA
Рет қаралды 4,6 МЛН
The Framer Motion Scroll Animation Masterclass
9:23
Tom Is Loading
Рет қаралды 17 М.
Advanced Sortable Drag and Drop with React & TailwindCSS
21:12
Tom Is Loading
Рет қаралды 37 М.
Authoring Components with CVA + tailwindcss - Basic Buttons (1 / 4)
17:04
React Tips with Brooks Lybrand
Рет қаралды 2,3 М.
A flexbox trick to improve text wrapping
5:02
Kevin Powell
Рет қаралды 178 М.
10 Tailwind Tricks You NEED To Know!
10:45
Ravi - Perfect Base
Рет қаралды 272 М.
CSS Tips And Tricks I Wish I Knew Before
12:12
Lama Dev
Рет қаралды 437 М.
cn() - Every Tailwind Coder Needs It (clsx + twMerge)
7:46
ByteGrad
Рет қаралды 117 М.
Top 10 CSS One Liners That Will Blow Your Mind
13:34
developedbyed
Рет қаралды 913 М.
A new approach to container and wrapper classes
25:27
Kevin Powell
Рет қаралды 246 М.
Main filter..
0:15
CikoYt
Рет қаралды 12 МЛН
SSD с кулером и скоростью 1 ГБ/с
0:47
Rozetked
Рет қаралды 394 М.
Will the battery emit smoke if it rotates rapidly?
0:11
Meaningful Cartoons 183
Рет қаралды 32 МЛН
Simple maintenance. #leddisplay #ledscreen #ledwall #ledmodule #ledinstallation
0:19
LED Screen Factory-EagerLED
Рет қаралды 2,5 МЛН
CY Superb Earphone 👌 For Smartphone Handset
0:42
Tech Official
Рет қаралды 825 М.