slim.js web component
a minimal slim.js custom element that renders a short greeting from its own template.
html
<script src="//cdnjs.cloudflare.com/ajax/libs/slim.js/3.3.0/Slim.min.js"></script>
<my-tag></my-tag>
javascript
Slim.tag(
"my-tag",
`<div>Hello, i am a custom element</div>`,
class MyTag extends Slim {
// your code here
},
);
this demo preserves the compiled output and may depend on external libraries or services that are no longer available.