Skip to content

Introduction

ihasq edited this page Jul 29, 2025 · 2 revisions

HyperStandard (hstd) is a minimal JavaScript library designed for building fast, interactive, and extensible web interfaces.

It provides a concise and reactive programming model with a small API surface:

import { $, h as html, on } from "hstd";

function Component() {
  const count = $(0);

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

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

Here’s what each part does:

  • $() creates a reactive value, whose . $ property reflects the current state.
  • h is a tagged template function that defines HTML structure and binds reactive data.
  • on provides event binding in a reactive way.

Key Features

  • Reactive primitives with minimal boilerplate: use $() to create bindable state.
  • Lightweight templating via tagged template literals for HTML and event binding.
  • Composable components: small functions that return DOM element arrays.
  • Extensible with support for post-processing, async iterators, style classes, and more.

Whether you're building simple widgets or complex UI components, HyperStandard aims to keep things lean while empowering interactivity and reusability.


Continue in the Wiki by documenting installation, core API (exports), examples, and extendable features next.

Clone this wiki locally