Join Our Newsletter!

Keep up to date with our latest blog posts, new widgets and features, and the Common Ninja Developer Platform.

Why Should You Design a Component Library and How To Do It?

Amit Theodore Tzur,
Why Should You Design a Component Library and How To Do It?

Component libraries are mostly associated with design systems and are an important part of them. They enforce consistency and keep your company’s brand looking professional and organized. But what is a component library, exactly? 

To put it simply, it is a collection of UI elements (like buttons, fields, and inputs) that can be used throughout your brand by your developers or yourself in any future project with ease. 

Your job in building a library like that is to create a design that not only looks good, but is simple, easy to understand, and easy to reuse all around your brand. 

Having said that, it’s important to acknowledge that this is not an easy task and will take some time to accomplish. You shouldn’t worry, however, because although it looks intimidating, once you break it down into smaller pieces/steps it will be much easier to manage.

Why Should You Design a Component Library?

You may ask yourself “why should I go through the trouble of creating a component library from scratch when there are many libraries available out there?” The answer is not so black and white.

If you just need a simple functional component library and don’t really care much for the visual aspect, or if you lack the means to build one, you should probably just use a pre-made one. And, if you are interested, here are some pre-made libraries I can recommend: 

However, there are many advantages to creating your own library.

The Advantages of Creating Your Own Component Library

Consistency

Creating and using your own component library means everything is up to you to decide, so of course, you’ll be using your brand’s style! That way all of your projects will be consistent and will look alike — strengthening your brand visuals. 

Speed and Compatibility

While creating a component library may take some time, it will eventually provide a huge advantage for your future projects. By using existing components, you’ll be able to save yourself a lot of work and time.  

Accessibility and Customizability

Remember, the advantage of making a component library is making YOUR component library! Every component is going to meet your needs and the needs of your users. You can make it as you please and adjust it to fit your brand so that your users will have the best experience using it!

Cleanliness and Ease

The fact that you can access and reuse your components easily means that you’ll be able to put them in your project without the need to use lines upon lines of code to recreate a component — you’ll only need to write a few short lines and use your components with ease.

How To Start Designing a Component Library?

So how do you start designing a component library? Research, research, and more research! Making a good component library is not just throwing a button and calling it a day. Start by looking at existing libraries, learn about the different components, make a list of all the components you’ll offer in your library, and take inspiration from the internet and your research notes. After you’ve done your research and made a list of components, it’s time to dive in! 

Start slow and find your own way of doing it. I suggest you start with button types and selections and work your way up to the more difficult and complicated components. 

Build up your components one by one while keeping in mind your desired design and your users. Always remember that it doesn’t need to be intense visually, keep it simple and easy to understand. Go back to your research and notes, and think of what every component needs to achieve and its use in future projects.

Work on your components and make them look just the way you want them to — accessible, user-friendly, and right for you and your users. Everyone does it differently, but as long as you’re making it easy for your users to use, visually appealing, and with your brand’s visual style, you’re doing it right. 

And if you’re stuck or don’t know how to make a certain component or how to overcome a design-related challenge, there’s no need to worry, go back to your research, look up what solutions other libraries offer, and take inspiration from them to solve the problem effectively. 

There’s no shame in going back to fix components, change them, or add more after you’re done, even when the library is already out.

Tips

Keep It Clean

Try to keep everything clean in your document, both for you and the developers. Give every component a title above it, and keep them neatly organized. 

Make a Style Guide

An additional step that you should take is to add another page or artboard to your document, and make a list of all the colors and text styles you’ve used in the library! 

List your typography and write down what font family, size, and weight you’ve used, and for every color, have at least 5 different shades. Even if you don’t use them, it will be much easier to control and change things around after the library has been developed.

Conclusion

To summarize, a component library can be a useful tool to keep your brand simple and user-friendly. It helps your brand to be more consistent, easily recognizable, and easy to navigate. 

There are many great libraries out there and you can certainly find one that will fit your needs, without having to make your own, but creating your own library will make your life easier in the long run by helping your brand, and enhancing your users’ experience. 

Before you start, be sure to research different libraries and elements, and prepare a work plan to make it easier and more efficient. Start slow and rely on your research, always keep your needs and your users in mind, and build your library step by step. 

Don’t be ashamed to make changes and find better solutions, redo components as many times as you need, and most importantly, enjoy your work and be proud of your end result!

Amit Theodore Tzur is the UI/UX designer at Common Ninja. He likes playing the cello, music, books, and gaming and will never pass a good cup of ice cream.