create-dom
v1.0.0
Published
Lightweight create DOM element helper
Downloads
17
Readme
create-dom
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!')
)
)
)