The Dilemmas You'll Face When Creating a Component Library


First published: 12/05/2024

The Dilemmas You’ll Face When Creating a Component Library

Building a component library is a challenging and rewarding experience, but there’s more to it than writing great-looking components. At every step of the journey, you’ll need to make choices to ensure your library is built appropriately for its intended audience.

When building your library, you’ll need to consider the following dilemmas:

  • Should I write vanilla web components or use a library?
  • Should I export my library as a single package or as scoped packages?
  • How should I structure the repo of my library?
  • Should I use tooling to build and/or bundle my library?
  • What optimizations do I need to run?
  • How can I safely publish my library?
  • What should my library’s testing strategy be?
  • How to write documentation for my component library

The full article is posted on GitHub as a way to make it a more collaborative experience. I hope others can share their experiences and make the article more comprehensive.

Read the full article on GitHub



If you enjoyed this article, then I figure you like to be kept in the loop with web development tips. If so, the Component Odyssey newsletter might be right up your alley.