A Low Profile Component Framework – Stable, minimal, easy to audit, zero-dependencies and build-tool-free.
Basic component definition is really simple:
import Tonic from "https://cdn.skypack.dev/@optoolco/tonic"
class MyGreeting extends Tonic {
render () {
return this.html`<div>Hello, ${this.props.name ?? 'Stranger'}.</div>`
}
}
Tonic.add(MyGreeting);
Tonic will automatically convert the CamelCased class name to the proper custom element name.
<my-greeting></my-greeting>
<my-greeting name="Bramus"></my-greeting>
Here’s the code above running on CodePen:
See the Pen
Tonic Web Components Demo by Bramus (@bramus)
on CodePen.
Also comes with an SSR package.