Skip to content

FlexiumSignals at 13ns.

A fine-grained reactive UI framework with hooks-style API. Compile-time signal substitution drops per-call overhead to ~13ns. 12 KB gzipped. Works with Vite.

Flexium

Hello, signals

tsx
import { use } from 'flexium/core'

function Counter() {
  const [count, setCount] = use(0)
  return (
    <button onclick={() => setCount(c => c + 1)}>
      {count}
    </button>
  )
}

Install

bash
npm create flexium@latest my-app
cd my-app && npm run dev

Or add to an existing app:

bash
npm install flexium

Why Flexium

Flexium 0.18React 19
Hook overhead13 ns (compile-time) / 550 ns (runtime)200–1,000 ns
Base client bundle12.56 KB gz~45 KB gz (react + react-dom)
Re-render modelSignal-targeted DOM patchVirtual DOM diff
1k row mount (Chrome)4.23 ms~50–100 ms
Cross-platformWeb DOM + Canvas + SSRWeb DOM (Native via separate stack)
Bundle includes routerflexium/router (no extra)react-router-dom (~10 KB extra)

→ See the examples for working code that exercises each capability, or showcase for real apps.

What's in Flexium

flexium/core — Signals (use, createSignal, createComputed, createEffect), Context, Useable.

flexium/dom — JSX runtime (f), render, Suspense, ErrorBoundary, Portal, lazy.

flexium/router — Client-side router: <Routes>, <Route>, <Outlet>, <Link>, useRouter.

flexium/css — Atomic CSS-in-JS with build-time extraction.

flexium/jsx-runtime — Standard JSX runtime, works with Vite/esbuild out of the box.

Ecosystem packages

  • flexium-canvas — Declarative canvas primitives (<DrawRect>, <DrawCircle>, <DrawText>, etc.)
  • flexium-ui — Layout primitives (<Column>, <Row>, <Center>, <Spacer>, <Portal>)
  • vite-plugin-flexium — JSX transform + compile-time optimizations (Phase 7 substitution)
  • eslint-plugin-flexium — Linting rules for signal correctness
  • create-flexium — Project scaffolding (npm create flexium@latest)

Compatibility

  • Browser: all evergreen.
  • API: use() 5 overloads stable across 0.17.x and 0.18.x. New capabilities ship as additive APIs (e.g., createSignal) without breaking the existing hooks surface.
  • Tooling: Vite (recommended), esbuild, Webpack. Standard JSX runtime — works wherever React-style JSX works.

Released under the MIT License.