hyper-ui
A lightweight front-end UI lib.
TOC
Features
Lightweight
This lib is rather lightweight. The size of the file which you need to include is less than 10KB!
Declarative
To create interactive UIs, just define simple components for each state in your app, and changes will be found as well as updated efficiently.
Simple
You can just easily include it and start writing the code of you app because it can be just plain JavaScript.
Usage
npm
-
Use npm to install it as a dependency:
npm i hyper-ui -
Import the default export from the lib:
;// orconst HUI = ;
CDN
-
Include one of the following script tags in your HTML file: (If you want a specified version, just replace
latest
with that. For more information, visit www.jsdelivr.com or unpkg.com.)<!-- via jsdelivr --><!-- or via unpkg --> -
Access the APIs via the
HUI
global.
Hello World
<!-- index.html --> hyper-ui example <!-- Import the lib --> <!-- and your code -->
/* index.js */// Define a component called `Greeting`const Greeting = HUI;// Render the appHUI;
Links
Env Requirements
This lib depends on some features such as Map
, Symbol
, array.includes
and so on. So, if you want to use it in some old browsers, consider including some polyfills. For instance, include hpolyfill
in your HTML:
<!-- via jsdelivr --><!-- or via unpkg -->
Example
Here is a TODO app example:
TODO <!-- Load the lib --> <!-- Create the app -->