Sigment – A lightweight reactive JavaScript framework built with signals and vanilla JS.
npm install sigment
/* if import from sigment not work then you can add to index.html this code
<script type="importmap">
{"imports": {"sigment": "/node_modules/sigment/dist/index.js"}}
</script>
*/
import "sigment";
// Tag functions (div, h1, p, button, etc.) are globally available after this import
function ComponentName() {
return div("hello sigment");
}
document.body.appendChild(ComponentName());
// Reactive counter example:
import { createSignal } from "sigment";
function Counter() {
const [count, setCount] = createSignal(0);
return div(
h1('Sigment Reactive Framework'),
button({ onClick: () => setCount(count() + 1) }, 'Increment'),
p(() => `Count is: ${count()}`)
)
}
document.body.appendChild(Counter());