Marko: HTML Templating
Marko is a really fast and lightweight HTML-based templating engine that compiles templates to readable Node.js-compatible JavaScript modules, and it works on the server and in the browser. It supports streaming, async rendering and custom tags.
Try Marko Online!npm install marko
Marko Widgets: UI Components
Marko Widgets is a UI component building library that utilizes Marko templates as the view. It offers advanced features like DOM diffing/patching, batched updates, stateful widgets, declarative event binding and efficient event delegation.
Try Marko Widgets Online!npm install marko-widgets
Clean and flexible syntax
HTML Syntax
<html lang="en"><head><title>Marko Templating Engine</title></head><body><h1>Hello !</h1><ul ifdata.colors.length><li forcolor in data.colors></li></ul><div else>No colors!</div></body></html>
Concise Syntax
html lang="en"headtitle - Marko Templating Enginebodyh1 - Hello !ul ifdata.colors.lengthli forcolor in data.colorsdiv else- No colors!
Mixed Syntax
html lang="en"head<title>Marko Templating Engine</title>body<h1>Hello !</h1>ul ifdata.colors.lengthli forcolor in data.colorsdiv else- No colors!
Marko Usage
var template = ;app;
Marko Features
- Extremely fast
- Streaming and async rendering
- Progressive HTML rendering
- Custom tags
- Compiles to readable CommonJS modules
- Server-side and client-side rendering
- Use Marko with any web framework, including:
- Syntax highlighting in popular editors and IDEs
Marko Widgets Features
- Lightweight UI component building library
- Marko used as the view
- DOM diffing/patching using morphdom
- Batched updates
- Stateful and stateless UI components
- Declarative event binding
- Efficient event delegation
- Server-side and client-side rendering
- Compatible with Redux
If you are looking for Marko v2 docs, please see: Legacy Documentation: Marko v2