How We Chose to Implement Our Design System With Web Components
In case you missed my first post “Implementing a design system”, we chose to implement our design system with web components. This post will be about our thought process and the tradeoffs we considered when deciding on how we would implement with web components.
It is possible to write a web component using only native JavaScript and HTML, but it is challenging. It is much more common to use a library like Lit or Stencil. The library helps with registration of the web component and change management as well as interoperability with popular frameworks. In our case, in addition to Lit and Stencil, we also considered Mitosis, and compiling to web components with Solid or Angular.