All Projects → marko-js → Marko

marko-js / Marko

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

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
Marko
8 projects

Projects that are alternatives of or similar to Marko

Interview Problem Summary
🎤 Prepare for the interviews and sum up the most popular interview problems for front-end(HTML/CSS/Javascript), Web development, full-stack. Also did some typical coding practice questions, such as UI caculator
Stars: ✭ 112 (-98.96%)
Mutual labels:  frontend, dom
Elementx
⚡️ Functionally create DOM elements and compose them to a tree quickly
Stars: ✭ 62 (-99.43%)
Mutual labels:  frontend, dom
Gomponents
Declarative view components in Go, that can render to HTML5.
Stars: ✭ 49 (-99.55%)
Mutual labels:  ui-components, dom
Webrix
Powerful building blocks for React-based web applications
Stars: ✭ 41 (-99.62%)
Mutual labels:  ui-components, frontend
Egg Vue Webpack Boilerplate
Egg Vue Server Side Render (SSR) / Client Side Render (CSR)
Stars: ✭ 1,302 (-87.94%)
Mutual labels:  isomorphic, server-side-rendering
Typescript Hapi React Hot Loader Example
Simple TypeScript React Hot Loading example with Hapi Server-side rendering
Stars: ✭ 44 (-99.59%)
Mutual labels:  isomorphic, server-side-rendering
Tokamak
SwiftUI-compatible framework for building browser apps with WebAssembly and native apps for other platforms
Stars: ✭ 1,083 (-89.97%)
Mutual labels:  ui-components, dom
Crab
JavaScript library for building user interfaces with Custom Elements, Shadow DOM and React like API
Stars: ✭ 22 (-99.8%)
Mutual labels:  frontend, dom
Neo
Create blazing fast multithreaded Web Apps
Stars: ✭ 1,219 (-88.71%)
Mutual labels:  vdom, frontend
Sauron
Sauron is an html web framework for building web-apps. It is heavily inspired by elm.
Stars: ✭ 1,217 (-88.73%)
Mutual labels:  vdom, dom
Onthefly
🔗 Generate TinySVG, HTML and CSS on the fly
Stars: ✭ 37 (-99.66%)
Mutual labels:  dom, server-side-rendering
Mithril Isomorphic Example
Example of an isomorphic mithril application
Stars: ✭ 107 (-99.01%)
Mutual labels:  isomorphic, frontend
Ng Zorro Antd
Angular UI Component Library based on Ant Design
Stars: ✭ 7,841 (-27.37%)
Mutual labels:  ui-components, frontend
Hapi React Hot Loader Example
Simple React Hot Loading example with Hapi Server-side rendering
Stars: ✭ 44 (-99.59%)
Mutual labels:  isomorphic, server-side-rendering
Preact
⚛️ Fast 3kB React alternative with the same modern API. Components & Virtual DOM.
Stars: ✭ 30,527 (+182.76%)
Mutual labels:  vdom, dom
Universal React Demo
ES6 demo of a simple but scalable React app with react-router, code splitting, server side rendering, and tree shaking.
Stars: ✭ 50 (-99.54%)
Mutual labels:  isomorphic, server-side-rendering
Zeroclipboard
The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie and a JavaScript interface.
Stars: ✭ 6,650 (-38.4%)
Mutual labels:  frontend, dom
Base
React-UI-Kit - frontend library with ReactJS components
Stars: ✭ 18 (-99.83%)
Mutual labels:  ui-components, frontend
Ui Challenges
UI challenges by Semicolon, we accept challenges on twitter on #SemicolonChallenge
Stars: ✭ 69 (-99.36%)
Mutual labels:  ui-components, frontend
Nipplejs
🎮 A virtual joystick for touch capable interfaces.
Stars: ✭ 1,313 (-87.84%)
Mutual labels:  frontend, dom

Marko

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

NPM Discord Build status Coverage Status Downloads

DocsTry OnlineContributeGet Support

Intro

Marko is HTML re-imagined as a language for building dynamic and reactive user interfaces. Just about any valid HTML is valid Marko, but Marko extends the HTML language to allow building modern applications in a declarative way.

Among these extensions are conditionals, lists, state, and components. Marko supports both single-file components and components broken into separate files.

Single file component

The following single-file component renders a button and a counter with the number of times the button has been clicked.

click-count.marko

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>

Multi-file component

The same component as above split into an index.marko template file, component.js containing your component logic, and style.css containing your component style:

index.marko

<div.count>
    ${state.count}
</div>
<button.example-button on-click('increment')>
    Click me!
</button>

component.js

module.exports = {
  onCreate() {
    this.state = { count: 0 };
  },
  increment() {
    this.state.count++;
  }
};

style.css

.count {
  color: #09c;
  font-size: 3em;
}
.example-button {
  font-size: 1em;
  padding: 0.5em;
}

Concise Syntax

Marko also supports a beautifully concise syntax as an alternative to its HTML syntax. Find out more about the concise syntax here.

<!-- Marko HTML syntax -->
<ul class="example-list">
    <for|color| of=['a', 'b', 'c']>
        <li>${color}</li>
    </for>
</ul>
// Marko concise syntax
ul.example-list
    for|color| of=['a', 'b', 'c']
        li -- ${color}

Getting Started

  1. npm install marko
  2. Read the docs

Community & Support

Ask and answer StackOverflow questions with the marko tag Come hang out in our Discord chat room, ask questions, and discuss project direction Tweet to @MarkoDevTeam or with the #markojs hashtag

Contributors

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

Get Involved!

  • Pull requests are welcome!
  • Read CONTRIBUTING.md and check out our bite-sized and help-wanted issues
  • Submit github issues for any feature enhancements, bugs or documentation problems
  • By participating in this project you agree to abide by its Code of Conduct.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].