A low-profile component framework. 1 file. 1 class. ~350 lines of code. No build tools are required. Native web components. Ideal for JAM stacks. Identical on client & server. Composition oriented. Event delegation by default. Lots of examples. 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. onic is a thin wrapper around web components. Web components require a name with two or more parts. So your class name should be CamelCased (starting with an uppercase letter). Tonic has no templating language, it uses HTML! But since HTML only understands string values, we need some help to pass more complex values to a component, for that we use this.html. There is no evidence that Virtual DOMs improve performance across a broad set of use cases, but it's certain that they greatly increase complexity. Tonic doesn't use them. Instead, we recommend incremental updates.

Features

  • 1 file. 1 class. ~350 lines of code
  • Identical on client & server
  • Event delegation by default
  • Composition oriented
  • Native web components
  • Ideal for JAM stacks

Project Samples

Project Activity

See All Activity >

Categories

Frameworks

License

MIT License

Follow Tonic

Tonic Web Site

Other Useful Business Software
Paessler: Easy to Use With Enterprise Power. Free Trial Icon
Paessler: Easy to Use With Enterprise Power. Free Trial

A low-code dashboard makes monitoring intuitive for any admin, while scripting and custom sensors give experts full control.

You shouldn't have to choose between a monitoring tool that's easy to use and one that's powerful enough for a complex environment. PRTG's low-code interface lets any admin build dashboards, set alerts and monitor devices without scripting, while custom sensors and full API access are there when your team needs deeper control. One platform, no compromise. Download a free 30-day trial now.
Get Free Download
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Tonic!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript Frameworks

Registered

2022-12-02