Gist ca40630fa6317183d1d8e1f9cdcfdcb3
✓ Published0🌍 Public
HHypercubed
Last edited Apr 16, 2019
Created on Apr 16, 2019
This example demonstrates a minimal Web Component built with the LitElement library, where a custom element named `my-element` displays the text “Web Components are great!” with the word “great” styled in green via scoped CSS. The code imports LitElement from a bundled module, defines a reactive `mood` property, and uses the `render()` method to template the output. The HTML file loads the script as an ES module, and the component is instantiated in the body with `mood="great"`. The setup also includes a configuration for the Airdrop CLI, which packages and bundles the `lit-element` dependency into the project’s local `-/` directory, though no data visualization is actually performed here.
AI-generated descriptionMIT Licensed