Marko extends HTML with components, control flow, and reactivity for building web UIs. It compiles to optimized server and client output with streaming and selective hydration.
Overview
Marko is a declarative, HTML-oriented language for constructing dynamic, reactive user interfaces. Most valid HTML remains valid Marko, with extensions for components, conditionals, loops, and a full reactivity system so state updates drive the view predictably.
The compiler targets both server and browser environments, emitting environment-specific code rather than one undifferentiated bundle. Pages can stream HTML as content becomes ready instead of waiting for full client bundles, and the runtime can ship only the JavaScript needed for interactive regions.
By default the approach minimizes client JavaScript while still supporting rich components when required. Marko is used in production on high-traffic sites such as eBay.com according to project materials, and new projects can be bootstrapped via npm tooling documented on markojs.com.
TypeScript integration provides inference across templates and components, with editor features like completion, navigation, and formatting. The language is positioned for developers who already work with HTML, CSS, and JavaScript but want a single declarative surface for server-rendered and client-enhanced apps.
Key features
- HTML syntax with components and reactivity
- Streaming server-side rendering
- Compiler output tuned per environment
- Selective client JavaScript shipping
- Built-in TypeScript template support
- Conditionals and loops in templates
- Resumable and granular hydration patterns
- Isomorphic server and client components
Use cases
- Interactive components with minimal JS
- Streaming ecommerce or content pages
- Server-rendered apps with client islands
- Progressive enhancement from HTML templates
- Type-safe UI modules in TypeScript projects