2 ms·
Web components are just custom html elements, with the option of an added shadowDOM. Oh, and slots. But that’s it. If you’ve got an interface component that you
by mock-possum 3y ago
Web components are just custom html elements, with the option of an added shadowDOM. Oh, and slots. But that’s it. If you’ve got an interface component that you find yourself using over and over - like say a complicated multi select drop down type thing - maybe you just make it a custom element, define a custom class that controls it, and drop instances of it throughout your site, the same as you’d drop default <select>s.