Marko

a friendly (and fast!) UI library that makes building web apps fun

simple.

If you know HTML, CSS, and Javascript, you know Marko

fast.

Faster loads via streaming and a tiny (~10kb gzip) runtime

progressive.

From simple HTML templates to powerful UI components

trusted.

Marko is powering high-traffic websites like ebay.com

Reactive UI components

Change the data backing a view and Marko will automatically and efficiently update the resulting HTML

class {
    onCreate() {
        this.state = { count:0 };
    }
    increment() {
        this.state.count++;
    }
}
 
style {
    .count {
        color:#09c;
        font-size:3em;
    }
    .example-button {
        font-size:1em;
        padding:0.5em;
    }
}
 
<div.count>
    ${state.count}
</div>
<button.example-button on-click('increment')>
    Click me!
</button>
0

Choose a syntax

Write in a familiar HTML-like style or drop the angle brackets and use Marko's concise syntax

<!doctype html>
<html>
<head>
    <title>Hello Marko</title>
</head>
<body>
    <h1>My favorite colors</h1>
    <ul.colors>
        <li for(color in input.colors)>
            ${color}
        </li>
    </ul>
</body>
</html>
<!doctype html>
html
    head
        title -- Hello Marko
    body
        h1 -- My favorite colors
        ul.colors
            li for(color in input.colors)
                -- ${color}

Silky smooth

Fast enough to power animations at 60FPS

The above animation is <div> tags. No SVG, no CSS transitions/animations. It's all powered by Marko which does a full re-render every frame.

Awesome tooling

Marko provides first-class support for the Atom editor with syntax highlighting, Autocomplete for both HTML and custom tags, Hyperclick to quickly jump to referenced files and methods, and Pretty printing to keep your code readable.

Community plugins also provide syntax highlighting for Sublime, VS Code, Webstorm & others!

View all editor plugins

Remarkoable performance across the board

Color picker
Search results
Inferno
2,176ops/s
Preact
4,192ops/s
React
260ops/s
Vue
1,146ops/s
Node.js(server)
Inferno
1,733ops/s
Preact
1,537ops/s
React
1,721ops/s
Vue
2,058ops/s
Desktop Browsers(average)
Inferno
419ops/s
Preact
358ops/s
React
379ops/s
Vue
426ops/s
Mobile Browsers(average)

The color picker benchmark

This benchmark measures the time it takes to cycle through 133 colors. The selected color index changes every cycle. When the selected color index changes three things happen:

  • The new selected color is highlighted
  • The old selected color is unhighlighted
  • The selected color's name is shown at the end

This benchmark measures how well a large render tree is optimized when only a few nodes actually need to be updated.

View the code on GitHub