Skip to content

rtsao/zirconium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zirconium

build status coverage status coverage status

A picoframework for Web Components

  • Eliminates unnecessary ceremony when defining custom elements
  • Provides a more functional interface versus vanilla custom element syntax
  • Tiny (<700 bytes gzipped)

usage

Your javascript:

var Zr = require('zirconium');
var h = require('hyperscript');

var myWidget = Zr({
  name: 'my-widget',
  elementDidInit: function(children) {
    return h('div', [
      h('div', {style: {color: 'red'}, 'hello world'),
      h('div', children)
    ]);
  }
});

Your markup:

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Hello World</title>
    <script src="main.js"></script>
  </head>
  <body>
    <my-widget>
      <div>foo</div>
    </my-widget>
  </body>
</html>

About

A picoframework for Web Components

Resources

License

Stars

Watchers

Forks

Packages

No packages published