Skip to content

Repository files navigation

Build Status

Mithril

A Javascript Framework for Building Brilliant Applications

See the website for documentation

There's also a blog and a mailing list


What is Mithril?

Mithril is a client-side MVC framework - a tool to organize code in a way that is easy to think about and to maintain.

Light-weight

  • Only 5kb gzipped, no dependencies
  • Small API, small learning curve

Robust

  • Safe-by-default templates
  • Hierarchical MVC via components

Fast

  • Virtual DOM diffing and compilable templates
  • Intelligent auto-redrawing system

Sample code

//namespacevarapp={};//modelapp.PageList=function(){returnm.request({method: "GET",url: "pages.json"});};//controllerapp.controller=function(){varpages=app.PageList();return{pages: pages,rotate: function(){pages().push(pages().shift());}}};//viewapp.view=function(ctrl){return[ctrl.pages().map(function(page){returnm("a",{href: page.url},page.title);}),m("button",{onclick: ctrl.rotate},"Rotate links")];};//initializem.module(document.getElementById("example"),app);

Learn more

About

A Javascript Framework for Building Brilliant Applications (development repo)

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages