Tonic

Tonic

A Low Profile Component Framework – Stable, minimal, easy to audit, zero-dependencies and build-tool-free.
GitHub
819
Created 5 years ago, last commit a month ago
12 contributors
542 commits
Stars added on GitHub, month by month
N/A
11
12
1
2
3
4
5
6
7
8
9
10
2022
2023
Stars added on GitHub, per day, on average
Yesterday
+1
Last week
+0.6 /day
Last month
+0.2 /day
Package on NPM
Monthly downloads on NPM
11
12
1
2
3
4
5
6
7
8
9
10
2022
2023
No dependencies
README

tonic

https://tonicframework.dev



Tonic is a low profile component framework for the web. It's one file, less than 3kb gzipped and has no dependencies. It's designed to be used with modern Javascript and is compatible with all modern browsers and built on top of the Web Components.

Installation

npm install @socketsupply/tonic

Usage

import Tonic from '@socketsupply/tonic'

class MyGreeting extends Tonic {
  render () {
    return this.html`<div>Hello, World.</div>`
  }
}

Tonic.add(MyGreeting, 'my-greeting')

After adding your Javascript to your HTML, you can use your component anywhere.

<html>
  <head>
    <script src="my-greeting.js"></script>
  </head>
  <body>
    <my-greeting></my-greeting>
  </body>
</html>

Useful links

Copyright (c) 2023 Socket Supply Co.

MIT License