hyperfixi

Tree-shakeable hyperscript runtime.
Human-readable UI behaviors from 5 KB.

One script tag for 85% of hyperscript in 11.1 KB. Or use the Vite plugin for automatic tree-shaking.

Tree-Shakeable

Ship only the commands you use. The Vite plugin generates optimal bundles automatically — from 5 KB.

Hypermedia Built In

Optional htmx-like capabilities included — or pair with your existing htmx setup.

Hyperscript Compatible

Implements the core _hyperscript language — 59 commands, 6 expression types, event handlers, and control flow. How hyperfixi relates to _hyperscript.

59 commands 5 KB lite bundle 2800+ tests 11.1 KB recommended 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

Choose Your Bundle Size

BundleSize (raw / gzip)CommandsBest for
hyperfixi-lite.js 5 KB / 2.0 KB gz 8 Minimal interactivity: toggle, show, hide, add, remove, set, put
hyperfixi-lite-plus.js 8 KB / 2.6 KB gz 19 Basic interactivity with wait, log, increment, trigger, go
hyperfixi-hx.js 81 KB / 21.5 KB gz 38 htmx/fixi drop-in replacement with hx-get, hx-post, hx-target
hyperfixi.js 1453 KB / 309.1 KB gz 59 Complete bundle with all commands and features

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

Quick Start

CDN (Simplest)

<script src="https://unpkg.com/@hyperfixi/core/dist/hyperfixi-hybrid-complete.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/i18n for 24-language support. See LokaScript docs.

Ready to Get Started?