Getting Started

Element is designed to be simple to set up and use. Whether you're building a small interactive component or a full application, Element provides the tools you need without unnecessary complexity.

Prerequisites

  • Basic knowledge of HTML, CSS, and JavaScript/TypeScript

  • Node and NPM (or Yarn/pNPM)

  • A modern Web browser that supports ES6+ features

Quick Start

Here's a minimal example to get you started:

import { createSignal, html } from "@dmnchzl/element";

const [content, setContent] = createSignal("Back To...");
setTimeout(() => setContent("BASICS!"), 1000);
const template = html`<div>${content}</div>`;

const root = document.getElementById("root");
root.appendChild(template);

Last updated