Why you should use Component Libraries

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ม.ค. 2023
  • You should use a component library because you will never finish that side project or idea because you spend too much time playing with Tailwind
    Join this channel to get access to perks:
    / @james-perkins
    Follow me on:
    📃 Website/Blog: jamesperkins.dev
    👉 Twitter: / james_r_perkins
    👉 Linkedin: / james-perkins-268992a4
    👉 Github: github.com/perkinsjr
    👉 Discord: / discord
    👉 Twitch: / jamesperkins
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 86

  • @james-perkins
    @james-perkins  ปีที่แล้ว +1

    What do you think about component libraries?

    • @Lucas-jb8ce
      @Lucas-jb8ce ปีที่แล้ว +3

      I find myself spending more time trying to add specific functionality to already-existing components from these UI libraries than building them from scratch. Tailwind + HeadlessUI has been my and my team's go-to for the past couple of months.

    • @csIn84
      @csIn84 2 หลายเดือนก่อน

      I agree, they're good for getting something together quickly.
      The issue is that users always ask for what they think are minor changes (the font is still way too big when using font-xs, that combo-box should have look-ahead typing AND be a multi-select, what if I want that fade-in/fade-out to also blur the background with an oversized logo instead of showing the controls behind it) that can't easily be accomplished with a ported component (or combination of them).
      I use it to get MVPs out, but when we're looking at a polished version of the app (and any components simple enough to do from-scratch to begin with), using pure CSS/SCSS/SASS or Tailwind is a must.
      The whole point of these frontend libraries (React) and frameworks (Angular, Vue, Solid, Svelte, etc.) is to create CUSTOM components with easily manipulable behavior that YOU can reuse for multiple situations. Start cheap, but go big or go home on your final product (production-ready, enterprise edition of any app). Yes, I know the "R" word is coming, but when you start with a component library and JS, it 100% makes sense to convert to TS and custom components for stability and consistency of expected, specific behavior.

  • @micoberss5579
    @micoberss5579 ปีที่แล้ว +14

    Two reasons I use component libraries :1) it saves time. 2) I dont have a good taste for design. I remember back in the days when bootstrap was popular I created a landing page using pure css, I was very proud of my design, and another using Bootstrap . Showed to my wife to choose the nicest of them. She picked the Bootstrap one, said that it looked nicer, more modern, easier on eyes. After that I rarely used pure css for my projects

    • @james-perkins
      @james-perkins  ปีที่แล้ว +1

      these are great reasons!

    • @fadlo1580
      @fadlo1580 ปีที่แล้ว +1

      i feel you brotha

  • @moutafatin
    @moutafatin ปีที่แล้ว +15

    I like to write my own components, and keep copying/pasting and improving them every time

    • @james-perkins
      @james-perkins  ปีที่แล้ว +6

      Building your own component library! Also a great option.

  • @guchierrez
    @guchierrez ปีที่แล้ว +4

    Holy. DaisyUI is literally what I was looking for and I had no idea it existed. Thanks.

  • @ClaudioBernasconi
    @ClaudioBernasconi ปีที่แล้ว +8

    We use MUI (formerly Material-UI) as React Component library at work. I have a personal project that still uses Bootstrap (and is a mess). This video helped me learn about DaisyUI, Mantine, etc. It's difficult to decide if you don't know those libraries upfront. However, I'd always use a component library for the exact same reasons you have in your video. 😉

  • @EliBates95
    @EliBates95 ปีที่แล้ว +9

    My team has had great success combining mantine and tailwind. Any time we need to customize a mantine component we slam some tailwind classes in and they play super nicely most of the time.

    • @james-perkins
      @james-perkins  ปีที่แล้ว +1

      I just did this for some stuff at work love the combination

  • @benixmaximus
    @benixmaximus 11 หลายเดือนก่อน +4

    Shadcn seems like a good all round solution

  • @RolandAyala
    @RolandAyala ปีที่แล้ว +2

    Interesting take. I transitioned off comp libs like mui & mantine to tailwinds / headless, plus daisy (just for the semantic colors and themes). True, can't throw together UI quite as quickly as w/ traditional comp lib, but have lot more flexibility and I in long run I spend less time because don't need to reverse engineer or workaround limitations each comp lib has.

  • @stanislavschaefer3233
    @stanislavschaefer3233 ปีที่แล้ว +5

    My only problem with UI libraries is that if you come across companies that incorporated an old version and never bothered to update the project with the current UI version, it is a nightmare trying to update everything to the current state.

  • @swlkr_
    @swlkr_ ปีที่แล้ว +5

    I am a tailwind purist, but I still liked and subscribed. TailwindUI templates + components have been pretty decent for me

    • @james-perkins
      @james-perkins  ปีที่แล้ว

      Let’s go! The purists are showing up

    • @william3588
      @william3588 11 หลายเดือนก่อน

      agreed!

  • @ShadowedOnion
    @ShadowedOnion ปีที่แล้ว

    What are your thoughts on native web component libraries like shoelace and microsoft FAST compared to react based libraries for building long term design systems?

  • @yeet_za
    @yeet_za ปีที่แล้ว +3

    We settled on Radix UI + Tailwind. Good stuff!

    • @james-perkins
      @james-perkins  ปีที่แล้ว +1

      a great choice!

    • @MrQuironX
      @MrQuironX ปีที่แล้ว

      What are the advantages bro?

  • @keithin8a
    @keithin8a ปีที่แล้ว +1

    Great video. I thought you did a great job at balancing the landscape.
    Is that excalidraw that you are using?

    • @james-perkins
      @james-perkins  ปีที่แล้ว +1

      It sure is! One of my favorite products out there.

  • @raphauy
    @raphauy ปีที่แล้ว

    Thank you!

  • @ongkay250
    @ongkay250 ปีที่แล้ว +4

    I love mantine UI + tailwindcss😍

  • @developerfilip
    @developerfilip ปีที่แล้ว +4

    Super insightful - I am a Tailwind fan, however, I don't like how much they charge for their pre-build component library. I have never heard of DaisyUI and will definitely check it out ;)

    • @james-perkins
      @james-perkins  ปีที่แล้ว

      DaisyUI is super helpful in getting some of reusable components done.

  • @ambuj.k
    @ambuj.k ปีที่แล้ว +7

    The thing about component libraries is that they come with a bit of learning curve. You need to look at their docs more often than you'd have to if you were using tailwind because you can far more easily guess classnames rather than component names and their props. At the end of the day it comes to preference but learning new things never hurts to find what sticks the best.

  • @nikosmj1
    @nikosmj1 ปีที่แล้ว +1

    I really prefer using ui libraries one of my favorites is PrimeReact but when your manager says don't use libraries make everything by yourself you do everything by yourself,especially when the project it's too big everything matters especially for perfmonace reasons

    • @james-perkins
      @james-perkins  ปีที่แล้ว +2

      When your manager says “don’t use libraries” I’d question the manager.
      The performance can be vastly improved and UX UI can be delivered quickly allowing for business logic etc to be built.
      Trade offs don’t mean no, it means evaluation and analysis then decision making

  • @fooked1
    @fooked1 ปีที่แล้ว

    I've heard libraries like Mantine don't work well with SSR. Any thoughts on this?

    • @james-perkins
      @james-perkins  ปีที่แล้ว +1

      they have an SSR package so it should work

  • @stephendyson3003
    @stephendyson3003 ปีที่แล้ว

    I love using mantine, but wanting to start using thw nextjs app directory. So been switching to tailwind, unless there is a component library that works with the nextjs app directory

    • @james-perkins
      @james-perkins  ปีที่แล้ว

      tailwind + shadcdnUI has been my go to recently

    • @stephendyson3003
      @stephendyson3003 ปีที่แล้ว

      @@james-perkins Thanks looks interesting!

  • @LuisHernandez-ev5ho
    @LuisHernandez-ev5ho 3 หลายเดือนก่อน

    No click bate my brother, but keep the doing a good job!

  • @Victor-cg4hx
    @Victor-cg4hx ปีที่แล้ว

    Hello, is your browser Safari? I'm wonder how you customize it and how to have sidebar?

  • @user-qn6up8ib1c
    @user-qn6up8ib1c 9 หลายเดือนก่อน

    Using Radix UI with Tailwind. ❤ TailwindUI is cool too, but a bit lacking. However, I purchased it just to support the project.

  • @thetripletsbadboys4621
    @thetripletsbadboys4621 ปีที่แล้ว

    I NEEDEED THIS VIDEO LOL. I WAS JUST THINKING ABOUT IT

    • @james-perkins
      @james-perkins  ปีที่แล้ว +1

      Reading your thoughts right through the internet

    • @thetripletsbadboys4621
      @thetripletsbadboys4621 ปีที่แล้ว

      @@james-perkins lol i was thinking about trying daisyUI. unfortunately i havent found many tutorials about people using it

    • @james-perkins
      @james-perkins  ปีที่แล้ว

      I have a few on the channel.

    • @thetripletsbadboys4621
      @thetripletsbadboys4621 ปีที่แล้ว

      @@james-perkins thx i will check them

  • @justasydefix6251
    @justasydefix6251 ปีที่แล้ว +1

    Instead of "Stop using tailwind" how about "Think before using Tailwind" or "Components are more efficient than Tailwind" which is something I agree with.

  • @paemox
    @paemox 9 หลายเดือนก่อน +3

    Component libraries are almost impossible to customize.

  • @johnch1p
    @johnch1p ปีที่แล้ว +1

    I use MUI (material ui) for work and personal projects. It's well documented and imo easy to use. I've tried tailwindcss and I see why people like. I think I comes down to use case and personal preference. Chakra UI and Mantine UI are great component libraries also but I don't think they have been out as long as MUI. Anyways great video - I dropped a like. 👍

    • @james-perkins
      @james-perkins  ปีที่แล้ว +1

      Love this opinion. thanks for stopping by! thanks for watching hope you subscribe

    • @johnch1p
      @johnch1p ปีที่แล้ว +1

      @@james-perkins Thanks for the reply - yup I am subbed! 😎😎

    • @princeparaste5659
      @princeparaste5659 ปีที่แล้ว +1

      How to separate css styling from the component, in the docs everything is on same file. Is there any way or it is what it is?

    • @johnch1p
      @johnch1p ปีที่แล้ว +1

      @@princeparaste5659 if we are talking about MUI, yes, you can separate your CSS styles from the component or you can override the components styles using their styled() utility. I know they make a lot of use of the sx prop in the MUI docs but that can be separated out. Check out the Customization > How to customize section in the MUI docs. Hope this helps!

    • @rubendacostaesilva8442
      @rubendacostaesilva8442 ปีที่แล้ว

      @@princeparaste5659 The best way for me is creating a new theme with createTheme and ThemeProvider. You can literally create any style you wish, but it's somehow hard at the beginning, because you will have to target the default classes (for example, MuiButton-root is the class for the root button), but once you get the grasp of it, it will become super easy.

  • @venkatapenumatsa3959
    @venkatapenumatsa3959 ปีที่แล้ว

    I like chakra in general, I used it in one of the project. But lately it’s not compatible with in Next 13 inside app directory. 😢

    • @james-perkins
      @james-perkins  ปีที่แล้ว

      To use Chakra UI in those components, you need to convert them into client-side component by adding a 'use client'; at the top of your file. Chakra UI only works in client-side components.

    • @venkatapenumatsa3959
      @venkatapenumatsa3959 ปีที่แล้ว

      @@james-perkins That's where I got annoyed: for each component, you need a separate component with style management. There are a few additional problems, such as a problem with the Link component and, every now and again, the Hydration issue. I will approach the Chakra team to provide an example or documentation to help newbies avoid being hit.

    • @betomegarcia
      @betomegarcia ปีที่แล้ว

      The same for Mantine. They are not ready for server components.

  • @phomolontokoane1507
    @phomolontokoane1507 ปีที่แล้ว

    He has a point. Imagine you have a dateline and you are worried about the ui when important parts are not finished.

  • @njayman
    @njayman ปีที่แล้ว +1

    Also try headless UI with tailwind.

    • @james-perkins
      @james-perkins  ปีที่แล้ว

      Plus one to this. A great option

  • @Nokoredev
    @Nokoredev 19 วันที่ผ่านมา

    I have been debating about creating my own component library, I initially building pages from scratch then came across Tailwind and it feels like I am cheating 😅😅

  • @william3588
    @william3588 11 หลายเดือนก่อน

    no way Jose!

  • @theanswer1993
    @theanswer1993 ปีที่แล้ว +1

    I use Tailwind because customising component libraries is pain in the ass. I rather create the components myself.

  • @QuassaKE
    @QuassaKE ปีที่แล้ว

    tailwind headless daisyui

  • @JagdeepSinghKalsi
    @JagdeepSinghKalsi ปีที่แล้ว +1

    Misleading thumbnail and title. Video is good though. Like it.

  • @DeepTitanic
    @DeepTitanic ปีที่แล้ว

    If you're needing to use a library like Daisy to make Tailwind more manageable then JFC maybe Tailwind isn't a good solution.

    • @james-perkins
      @james-perkins  ปีที่แล้ว

      “Moving faster” !== “More manageable” Tailwind is fairly easy to manage when you have reusable components, layouts etc.
      Which is what DaisyUI does, makes reusable components that allows you to move quickly

    • @DeepTitanic
      @DeepTitanic ปีที่แล้ว

      I personally find Daisy UI to be cumbersome in production and is only 2 layers of abstraction from CSS ..which is why I've written an AI CSS solution call "Daisy Chain". It automates the process of abstraction and uses machine learning to create UI libraries.
      It radically simplifies the process of centring a div by letting you modify the DOM in Rust.

  • @oscardasilva971
    @oscardasilva971 ปีที่แล้ว

    Daisy UI looks like Bootstrap with extra steps.

  • @JEsterCW
    @JEsterCW ปีที่แล้ว +1

    Using UI libs is only a pick when we have to deliver product pretty quickly or theres no budget for custom ui and even tho the only viable pick is mantine atm, MUI and chakra are pain in the ass, chakra is survivable yet, but MUI has the worst DX you could ever experience and the only value is that it gives hella alot of variants of x component and thats cool for customizing ui of an app with only "copy and paste from docs". Otherwise TailwindUI+RadixUi+Tailwind for customizing the components i dont see any better pick I would never use UI lib like mui, its catastrophic experience, but client doesnt care what you will use and what matters is the final results, so from business/company perspective who have a team of devs picking ui can be a good pick, but for somebody who wanna work on a single longterm product custom components and ui is the only pick.
    I also hate UI libs overall, but I love tailwind and thats why i wanna build my own tailwind based ui lib to use it for my projects since im more focused on delivering functionalities these days than ui and how does it looks like

    • @james-perkins
      @james-perkins  ปีที่แล้ว +4

      Did you watch the video?
      - I talk about DaisyUI
      - I talk about Tailwind UI + Headless UI as an example.
      - I never talk about MUI
      - I talk about Mantine
      - I explain why ChakraUI is actually flexible more than people know.
      I feel like this is just your opinion piece and you didn't watch more of the video than the intro and saw a thumbnail

  • @mohammedaslam2912
    @mohammedaslam2912 ปีที่แล้ว

    What about component libraries based on tailwind? Like daisyui

  • @WilliamShrek
    @WilliamShrek ปีที่แล้ว

    You persuade our designers and I buy you coffee for a month. 🙄

    • @james-perkins
      @james-perkins  ปีที่แล้ว

      Well it worked for our designers so maybe 🤔

  • @leojohn6702
    @leojohn6702 ปีที่แล้ว

    The problem is that you will use enough time to modify those components

    • @james-perkins
      @james-perkins  ปีที่แล้ว

      Unlikely that you spend as much time modifying components in a lib as creating them all from scratch.

    • @eliasimokhai
      @eliasimokhai ปีที่แล้ว +1

      Exactly the point with component libraries.

  • @xphstos_
    @xphstos_ ปีที่แล้ว

    We’ll I guess most of you guys, don’t have to deal with intricate designs. Designs that change completely the look and feel of a basic component. Designs that push design and user experience to the edge. In those cases, yes it’s only logical to have some libraries in your arsenal… but there are cases that the libraries won’t cut it.
    There are libraries like radix, react-aria, headlessUI that offers you basic components and their functionality but they’re without styling. That way you get to author you’re styles with having to override a bunch of predefined styles.

    • @james-perkins
      @james-perkins  ปีที่แล้ว

      did you watch the video?
      I literally talk about some of those options in the video.
      I dealt with intricate designs for over a decade and everything in this video still applies to the exact audience it targeted.

    • @xphstos_
      @xphstos_ ปีที่แล้ว +1

      @@james-perkins I did, in which min you talk about headless libraries?

    • @james-perkins
      @james-perkins  ปีที่แล้ว +1

      Sorry wrong video. I talk about Radix with tailwind in an stream I did which sparked this video
      Either way this video is targeted for a specific group of oeople who spend more time messing around with tailwind then building the SaaS then end up abandoning it because it got to messy to quickly.
      This isn't a video for people using complex design system although even those I bet could be handled with Chakra in 2023.

  • @UrduPoetry-vd1mc
    @UrduPoetry-vd1mc 8 หลายเดือนก่อน

    the most irritating thing i have ever found during my journey of Full Stack Developer is Tailwind CSS

    • @coldsun1187
      @coldsun1187 หลายเดือนก่อน

      My guess is your pages look like crap then or they look the same as everyone else's.