Installation
Option 1: NPM Package (Recommended)
Install Element from NPM:
npm install @dmnchzl/elementThen import and use in your application:
import { createSignal, html } from "@dmnchzl/element";
function App() {
const [count, setCount] = createSignal(0);
return html`
<div>
<h1>Count: ${count}</h1>
<button onclick="${() => setCount(count() + 1)}">Increment</button>
</div>
`;
}Option 2: CDN (Quick Start)
For quick prototyping or simple projects, you can use the CDN version:
Last updated