darioriverat / web-components-example

This is a web component usage example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

📌 Web Components usage example

This example shows you how to use a simple web component inside a static web page.

What is a Web Component ❓

Web Components is a suite of different technologies allowing you to create reusable custom elements — with their functionality encapsulated away from the rest of your code — and utilize them in your web apps.

-- MDN Web Docs

When to use Web Components ❓

✔️ Web components are based on existing web standards. No matter what framework you use actually (Angular, Vue, React), web components are here to stay for a long time!. Even you could create web components with your current framework (See vue-web-component-wrapper).

✔️ All major browser vendors are supporting them. Otherwise you can use polyfills if you really need to support older browsers.

✔️ You can reuse it through the whole app reducing duplications and imrpoving maintainability.

Installation

You can download this library and execute the following command to run the HTTP server.

npm run dev

For production build you can use the following

npm run prod

About

This is a web component usage example


Languages

Language:HTML 92.4%Language:JavaScript 7.6%