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 Рік тому +4

      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 3 місяці тому

      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 Рік тому +15

    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

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

    Shadcn seems like a good all round solution

  • @moutafatin
    @moutafatin Рік тому +16

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

    • @james-perkins
      @james-perkins  Рік тому +7

      Building your own component library! Also a great option.

  • @EliBates95
    @EliBates95 Рік тому +10

    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  Рік тому +2

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

  • @guchierrez
    @guchierrez Рік тому +4

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

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

    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. 😉

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

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

    We settled on Radix UI + Tailwind. Good stuff!

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

  • @ongkay250
    @ongkay250 Рік тому +4

    I love mantine UI + tailwindcss😍

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

    Thank you!

  • @LuisHernandez-ev5ho
    @LuisHernandez-ev5ho 4 місяці тому

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

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

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

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

  • @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 10 місяців тому +3

    Component libraries are almost impossible to customize.

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

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

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

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

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

  • @user-qn6up8ib1c
    @user-qn6up8ib1c 11 місяців тому

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

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

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

    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 😅😅

  • @Victor-cg4hx
    @Victor-cg4hx Рік тому

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

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

    Also try headless UI with tailwind.

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

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

    no way Jose!

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

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

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

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

  • @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  Рік тому +5

      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 9 місяців тому

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

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

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