Morph
Build native desktop applications with HTML, CSS, and JavaScript. No browser, no Electron, no WebView — just a lightweight native binary.
morph init my-app
cd my-app
morph devWrite familiar .mx files (JSX + CSS + TypeScript). Morph compiles them directly to native OpenGL binaries with zero runtime overhead.
// src/App.mx
import { CSS, morphState } from 'morph'
CSS.load("./style.css")
export const windowConfig = { title: "My App", width: 800, height: 600 }
export default function App() {
const [count, setCount] = morphState(0)
return (
<body>
<div className="app">
<h1 style="color: #e0e0e0;">Hello from Morph</h1>
<button className="btn" onClick={() => setCount(count + 1)}>
Clicked {count} times
</button>
</div>
</body>
)
}morph dev # live window, hot reload
morph run # optimized native binaryWhy Morph?
| Electron | Qt | Morph | |
|---|---|---|---|
| Write UI in | HTML/CSS/JS | C++ / QML | TS/JSX/CSS |
| Runtime | Chromium (~150MB) | Qt libs | Zero |
| Binary size | ~80MB+ | ~20MB+ | <1MB |
| Native OpenGL | ✗ | ✓ | ✓ |
| Hot reload | ✓ | ✗ | ✓ |
Key Features
.mxfiles — JSX-like syntax with TypeScript/JavaScript and CSS in a single file- CSS — Flexbox, transitions, animations, transforms, Tailwind utilities
- Reactive state —
morphStateandmorphEffectfor component reactivity - Async networking —
fetch()with coroutines, runs on worker threads - C++ interop — Import user
.cppfiles directly into your JSX - DevTools — Built-in element inspector, rendering profiler, network log
- Tiny binaries — Feature-based dead code elimination, optional UPX compression
Next Steps
- Installation — Set up your system
- Quick Start — Build your first app in 2 minutes
- Configuration — All
morph.config.jsonoptions