Skip to content
/ libh Public

HTML in JavaScript Library

Notifications You must be signed in to change notification settings

ihasq/libh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚙ libh

// Import some stuff

import { $, h as html, on } from "libh"


// Design your component

function Component() {

    const count = $(0);

    return html`
        <h1>Count is ${count}</h1>
        <button ${{ [on.click]: () => count.$++ }}>
            Add more!
        </button>
    `;
}


// Put into the DOM

document.body.append(...Component());

Visit live demo.

Install

npm i libh

About

HTML in JavaScript Library

Resources

Stars

Watchers

Forks