DEV Community

Discussion on: Why We Use Web Components

Collapse
 
adoumas profile image
Alex Doumas • Edited

We using stencil for a year now to build our Shared Design System for our company's Products that uses react and angular frameworks. We manage to build a Design System (ui tookit) with 80+ components based on bootstrap layout (grid,flex,responsive,spacing), material web components (ui elements), material icons (120+) and some custom components (carousel, datetime picker, steppers etc) in a bundle of 278kb all inclusive. A similar approach for react with material ui was double and some times triple the size just for the UI same for the angular with mat and we had to support 2 different design systems. And with this aproach we had inconsistencies in the UIs. Some architectural strategies that we pick was not to use the shadow dom because we want themability without extra packaging/processing so we use css vars with BEM methodology and selenium GUI testing. Overall the outcome was lighting fast apps, one design system for all frameworks and N themes on the fly just writing 10-80 css vars on how you want to enhance the theme.