@flatmax/web-lit-component
v1.0.0
Published
Clone this component to build new ones based on Lit
Downloads
1
Readme
<web-lit-component>
Basic infrastructure for Lit web components. Use this repo to start a new webcomponent.
Steps to create your own web component based on Lit :
- Choose a name for your component : I will choose VanillaLit (vanilla-lit)
- Clone the repo :
git clone [email protected]:flatmax/web-lit-component.git
- Rename the repo :
mv web-lit-component vanilla-lit
- Rename some files in the repo :
- mv web-lit-component.js vanilla-lit.js
- mv src/WebLitComponent.js src/VanillaLit.js
- Find and replace the component name :
- Replace "WebLitComponent" for "VanillaLit"
- Replace "web-lit-component" for "vanilla-lit"
Local Demo with web-dev-server
npm start
To run a local development server that serves the basic demo located in demo/index.html
Usage
<script type="module">
import 'web-lit-component/web-lit-component.js';
</script>
<web-lit-component></web-lit-component>