hyperfixi

Tree-shakeable hyperscript engine.
Human-readable UI behaviors in 33.3 KB.

One script tag, gated by upstream _hyperscript's own test suite: 1401 of its 1467 tests pass. Or use the Vite plugin to ship only the commands you use.

Tree-Shakeable

Ship only the commands you use. The Vite plugin scans your source and generates a bundle with just those commands.

Hypermedia Alongside

Hyperscript handles behavior; pair it with fixi or htmx 4 for hypermedia attributes.

Hyperscript Compatible

Upstream _hyperscript's grammar — 53 commands, event handlers, and control flow, checked against upstream's own tests. How hyperfixi relates to _hyperscript.

53 commands 24 languages 1401/1467 upstream tests 33.3 KB gzipped bundle

Try It - Live Interactive Demos

Toggle Class

on click toggle .active on me

Counter

on click
  set my.count to (my.count or 0) + 1
  put 'Clicks: ' + my.count into me

Color Cycle

on pointerdown
  repeat until event pointerup
    set rand to Math.random() * 360
    transition *background-color
      to `hsl($rand 100% 90%)`
      over 250ms
  end

The Bundle

BundleSize (raw / gzip)CommandsBest for
hyperfixi.js 94 KB / 33.3 KB gz 53 Hyperscript, upstream's grammar, every module; the same file as hyperfixi-hs.js

Sizes are the installed @hyperfixi/core@4.3.0 build. With Vite tree-shaking, you ship only the commands you actually use. See Bundle Selection.

Quick Start

CDN (Simplest)

<script src="https://unpkg.com/@hyperfixi/core/dist/hyperfixi.js"></script>

<button _="on click toggle .active on me">
  Click me
</button>

npm + Vite (Recommended)

npm install @hyperfixi/core @hyperfixi/vite-plugin
// vite.config.js
import { hyperfixi } from '@hyperfixi/vite-plugin';

export default {
  plugins: [hyperfixi()]
};

The Vite plugin automatically scans your code and generates a minimal bundle with only the commands you use.

Events First

Send, receive, filter, queue, and debounce events with ease. Chain events together for complex interactions.

Async Built-In

No promises, async/await, or callback hell. hyperfixi transparently handles asynchronous behavior.

_hyperscript Compatible

Implements the core _hyperscript language. Standard hyperscript syntax works as-is.

Tree-Shakeable

Only include the commands you use. The Vite plugin generates optimal bundles automatically.

MCP Integration

22 tools for AI assistants: validation, pattern search, and code generation via @hyperfixi/mcp-server.

Multilingual Ready

Need multilingual support? Add @lokascript/semantic to parse and translate hyperscript across 24 languages. See LokaScript docs.

Ready to Get Started?