What is Marko?
Marko is a declarative, HTML-based language designed to make building dynamic and reactive user interfaces fun and efficient. Just about any valid HTML is valid Marko, but it extends HTML with JavaScript to allow building modern applications in a declarative way. Marko compiles templates to perform optimally on both server and browser, delivering faster first paint through streaming, granular updates, and fine-grained bundling.
With built-in TypeScript support, strong type inference, and editor features like autocompletion and jump-to-definition, Marko helps developers catch errors early and write better code faster. It is trusted by high-traffic websites like eBay.com, and scales from simple HTML templates to powerful reactive components.
Features
- Streaming: Streams content to users as soon as it's ready, improving first paint time.
- Granular Reactivity: Ships only needed code, skipping hydration and stripping unused code at the sub-template level.
- Optimized Compilation: Compiles templates for environment-specific output, smaller bundles, and faster loads.
- Built-in TypeScript Support: Strong type inference across templates and components with full language features.
- HTML Compatibility: Valid HTML is valid Marko, with extended syntax for dynamic behavior.
- Server and Client Optimization: Output tailored for both server and browser performance.
Use Cases
- Building dynamic web applications with reactive UIs
- Creating high-performance e-commerce sites with streaming
- Developing scalable single-page applications (SPAs)
- Rendering static or dynamic HTML templates
- Building component-based web interfaces
FAQs
-
What is Marko?
Marko is a declarative, HTML-based language for building dynamic and reactive user interfaces. It extends HTML with JavaScript and compiles to optimized server and browser code. -
Is Marko free to use?
Yes, Marko is open source under the MIT License and free to use. -
Does Marko support TypeScript?
Yes, Marko has built-in TypeScript support with strong type inference across templates and components. -
How does Marko achieve performance?
Marko uses streaming, granular reactivity, fine-grained bundling, and optimized compilation to deliver fast first paint, smaller bundles, and efficient updates.