sigment
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

sigment

Sigment – A lightweight reactive JavaScript framework built with signals and vanilla JS.

🚀 Installation

npm install sigment

Usage

/* 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());

Package Sidebar

Install

npm i sigment

Homepage

sigment.dev

Weekly Downloads

374

Version

1.2.0

License

MIT

Unpacked Size

41.8 kB

Total Files

6

Last publish

Collaborators

  • wappaa