DEV Community

Cover image for UI component libraries are awesome!
Bassem
Bassem

Posted on

UI component libraries are awesome!

Hey devs from all over the world 😊

We all know what UI component libraries are, There are tons of great ones out there. I am more interested in building them though. It's like laying a foundation that will be used in every project to come! To me, That's both super scary and super cool!

Its impact

I love the idea of writing code that will be used and maintained by every developer in every project. I mean you are not just building a boring contact-us page or anything, you are writing components for every future project.

Of course, it is not a one-time project kinda thing. UI libraries should always be In development. That being said, maintaining an already mature UI library is one thing but "laying the foundation" sounds way cooler to me.

It is sophisticated

A couple of years ago, The only way frontend code gets used over and over again is by making CSS classes. That's it! A couple of CSS rules that get applied to multiple elements. It was a big thing! I remember how changing a small value in those famous classes impacted the whole project.

Now, UI component libraries are much more sophisticated! First off, These components contain both the HTML & the CSS, They render differently depending on the props (input) you give them, They should also be able to handle as much use cases as possible. Of course, They won't be able to handle all of them out there! This is more of a utopia kinda thing. But still, UI libraries are not just about your use cases, They are built for everyone!

Its a bridge between design and dev

Designers usually have lots of systems in place. They have systems for colors, typography, sizes. They even build components like buttons and input fields. Then they use those systems and components all over their designs.

UI components libraries are the closest thing to a design system in the dev world. They should be built upon the design system. That will ensure those systems are more of rules not just guidelines and make sure the look & feel is consistent across all projects that use the same UI library.

It speeds up development

I am sure UI libraries do speed up development if they are mature enough. But, they still take a big investment upfront. Also, they should be maintained all the time to handle new use cases and business logic.

I think they are an investment that only bears its fruit in the long term. I was never involved in the process of building a UI library from scratch before. I would love to someday!

That's basically it! Now it's your turn, tell me how you feel about UI libraries? Have you ever been involved in building one from the start? Do you have any tips and tricks that you learned while building one?

As always,
Happy coding 🔥🔥
“كود بسعادة”

Top comments (0)