Marko

A declarative, HTML-based language that makes building web apps fun

Server-Side Rendered

Interactive Counter Component

This component has its own state — powered by Marko's class-based components.

0

Why Marko?

Streaming HTML

Marko streams HTML to the browser as it renders — no waiting for the full page.

🧩

Components

Build reusable UI components with encapsulated state and logic.

📦

Small Runtime

Marko ships only what the browser needs — automatic partial hydration.

🔥

Reactive

Fine-grained reactivity with automatic DOM updates when state changes.

🏎️

Fast Compilation

Templates are compiled to optimised JavaScript at build time.

🌊

Async Rendering

First-class support for async data with the <await> tag.

Sample Marko Template

// A simple counter component in Marko
class {
    onCreate() {
        this.state = { count: 0 };
    }
    increment() {
        this.state.count++;
    }
}

<button on-click("increment")>
  Clicked ${state.count} times
</button>