Skip to content

ghoullier/create-dom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

create-dom

NPM version Gitter Dependency Status

Lightweight create DOM element helper.

Install

There are several ways to get a copy of create-dom. Pick whichever one you like:

  • Use it via UNPKG: https://unpkg.com/create-dom/index.js. This is a simple way to embed it on a webpage without having to do any other setup.
  • Install via NPM: npm install --save create-dom
  • Install via YARN: yarn add create-dom

Require

const dom = require('create-dom');

Documentation

Examples

Add title with link to body

document.body.appendChild(
  dom('div', {}
    dom('h1', {}
      dom('a', { href: 'https://github.com/ghoullier/create-dom' }, 'Fork me on GitHub!')
    )
  )
)

About

Lightweight create DOM element helper

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published