rbel

1.0.2 • Public • Published

rbel

create your own elements for hyperx tagged templates

example

const h = require('hyperscript');
const html = require('rbel')(h, {
    row: (attrs, children) => html`
        <div class="row">
           ${children}
        </div>`,
    column: (attrs, children) => html`
        <div class="col col-md-${attrs.md}">
           ${children}
        </div>`,
});
 
console.log(html`
<row>
    <column md="12">
        <span>1 ciao!</span>
    </column>
</row>`.outerHTML);

Values to use for h:

  • virtual-dom - vdom.h
  • react - React.createElement
  • bel - require('bel').createElement
  • hyperscript - hyperscript

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    0
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i rbel

Weekly Downloads

0

Version

1.0.2

License

BSD

Last publish

Collaborators

  • aaaristo