npm.io
0.0.3 • Published 4 years ago

element-mold

Licence
MIT
Version
0.0.3
Deps
0
Size
29 kB
Vulns
0
Weekly
0

Element mold

A collection of simple HTML/SVG Element generation functions. Supports typescript!

example

import {section, h1, div, span, b} from 'element-mold/dist/html';

let ref1, ref2;
const refSection = section({className: 'container'}, [
  ref1 = h1('Heading Text'), 
  ref2 = div({className: 'container-body'}, [
    'test',
    span({}, [
      ' text',
      b('bold'),
      ' text',
    ]),
  ]),
]);

console.log(refSection, ref1, ref2);

Keywords