Tonic
A Low Profile Component Framework – Stable, minimal, easy to audit, zero-de...
README
A low profile component framework.
- 1 file. 1 class. ~350 lines of code.
- No build tools required.
- Native web components.
- Ideal for JAM stacks.
- Identical on client & server.
- Composition oriented.
- Event delegation by default
- Lots of examples.
Getting Started
Building a component with Tonic starts by creating a function or a class. The class should have at least one method named render which returns a template literal of HTML.
- ``` js
- import Tonic from '@socketsupply/tonic'
- class MyGreeting extends Tonic {
- render () {
- return this.html`<div>Hello, World.</div>`
- }
- }
- ```
or
- ``` js
- function MyGreeting () {
- return this.html`
- <div>Hello, World.</div>
- `
- }
- ```
See: https://tonicframework.dev