This is a component
No JSX, no compiler — a plain object plus patches, reactive out of the box:
import { toState } from "@domphy/core"
import { button, heading } from "@domphy/ui"
const count = toState(0)
const App = {
div: [
{ h3: (l) => `Count: ${count.get(l)}`, $: [heading()] },
{ button: "Increment", onClick: () => count.set(count.get() + 1), $: [button({ color: "primary" })] },
{ button: "Reset", onClick: () => count.set(0), $: [button()] },
],
}Live, right here on the page:
Packages
| Package | Description |
|---|---|
@domphy/core | Runtime — elements, reactivity, lifecycle, SSR |
@domphy/theme | Design tokens — color, spacing, size, dark mode |
@domphy/ui | 98 UI patches — button, dialog, table, form controls… |
@domphy/app | App layer — file-based routing, layouts, SSR, lazy routes |
@domphy/query | Async data fetching, caching, mutations, infinite queries |
@domphy/router | Type-safe client-side router with search params and loaders |
@domphy/table | Headless table — sorting, filtering, pagination, grouping |
@domphy/virtual | Virtualization — lists, grids, masonry, infinite scroll |
@domphy/form | Form state, validation, field arrays, async submission |
@domphy/dnd | Drag and drop — sortable lists, multi-container, multi-drag |
@domphy/blocks | 173 composed blocks — sidebars, auth pages, dashboards, effects |
@domphy/chart | SVG + WebGL charts — line, bar, pie, scatter, gauge… |
@domphy/three | Declarative three.js scene graph on Domphy reactivity |
@domphy/editor | Rich-text editor — Tiptap-compatible API, self-contained engine |
@domphy/floating | Anchor positioning — floating-ui core, zero-dep, powers overlays |
@domphy/press | SSG docs engine — markdown, search, islands, routing |
@domphy/i18n | i18next wrapper with reactive t(listener, key) |
@domphy/doctor | Static analyzer — flags non-idiomatic code, auto-fixes |
@domphy/mcp | MCP server — 10 tools for AI agents to explore the framework |
create-domphy | Scaffolder — npm create domphy@latest Vite + TS starter |
Installation
npm install @domphy/ui @domphy/core @domphy/theme<script src="https://unpkg.com/@domphy/ui/dist/core-theme-ui.global.js"></script>