marko README

The project's README from github.com/marko-js/marko. As one markdown file: README.md.

Marko

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

NPM Discord Chat Continuous Integration status Code coverage % # of monthly downloads OpenSSF Best Practices

Docs ∙ Try Online ∙ Contribute ∙ Get Support

Intro

Marko is HTML reimagined as a language for building dynamic and reactive user interfaces. Almost any valid HTML is valid Marko, and Marko extends HTML for building modern applications more declaratively. Among these extensions are components, conditionals and loops, and a full reactivity system.

Example Component

The following renders a button and a counter of how many times the button has been pressed:

click-count.marko

// HTML + JavaScript = 💜
<let/count=0>
<button onClick() { count++ }>
  Clicked ${count} times
</button>

Getting Started

  1. npm init marko
  2. Read the docs

Community & Support

Keep up with the community on Bluesky at @markojs.com

Tweet to @MarkoDevTeam or use the #markojs hashtag

Browse the code, open issues, & make pull requests on GitHub

Hang out in our Discord server to ask questions & discuss marko

Contributors

Marko would not be what it is without all those who have contributed ✨

All marko-js/marko GitHub contributors

Get Involved!

marko (marko-js/marko)

Searching Database…

14.5K ·GitHub
这是什么?Marko 是一种声明式、基于 HTML 的语言,用于构建动态、响应式的用户界面。它在普通 HTML 的基础上扩展了组件、条件判断、循环,以及内置的响应式系统。
它是模板语言、框架,还是库?它是一个 UI 框架,围绕自有的基于 HTML 的模板语言构建,该语言会编译为 JavaScript,同时支持客户端渲染和服务端渲染。
我该如何创建一个新的 Marko 项目?运行 'npm init marko' 即可生成一个新项目,然后按照文档学习如何构建组件。
我需要哪个版本的 Node.js?Marko 需要 Node.js 22.18.0+、24.x 或 26.0.0 及以上版本。
使用它需要学习很多新语法吗?不太需要。几乎所有有效的 HTML 也都是有效的 Marko,所以你是在已有知识的基础上扩展,而不必学习一整套新语法。
它是用来构建完整应用,还是只做 UI 小部件?它主要面向构建完整的动态、响应式 Web 应用,而不只是独立的小部件。
Marko 同时支持客户端渲染和服务端渲染吗?支持。Marko 是同构的,开箱即用地支持客户端渲染(CSR)和服务端渲染(SSR),这一点也与它自身的项目标签和设计相符。
Marko 组件长什么样?组件以类似 HTML 的 .marko 文件编写,例如 click-count.marko,将标记与组件逻辑(如计数器和点击事件处理)混合在一起。
不安装任何东西能试用 Marko 吗?可以。README 中提供了 'Try Online' 选项,可以在浏览器中直接体验 Marko,无需先搭建项目。
What are similar projects?hyperapp, riot, mitosis, nuxt, razzle, framework, preact, inferno
Creator
marko-js
Size
102.1 MB
Stars
14.5K
Age
12y
Commits · 90 Days