Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wrumsby/create-element
Create DOM elements with a succinct syntax.
https://github.com/wrumsby/create-element
Last synced: about 2 months ago
JSON representation
Create DOM elements with a succinct syntax.
- Host: GitHub
- URL: https://github.com/wrumsby/create-element
- Owner: wrumsby
- Created: 2016-01-08T21:03:04.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-09T10:29:14.000Z (almost 9 years ago)
- Last Synced: 2024-10-10T14:12:11.784Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# create-element
[![Build Status](https://travis-ci.org/wrumsby/create-element.svg?branch=master)](https://travis-ci.org/wrumsby/create-element)
## Installation
### Bower
```bash
bower install create-element
```You can use the [resolve-bower-module](https://www.npmjs.com/package/babel-plugin-resolve-bower-module) Babel plugin to resolve modules that are imported with Bower.
## Usage
```js
import createElement from 'create-element';const frag = document.createDocumentFragment();
frag.appendChild(createElement('div#container')
.appendChild(createElement('div.grid')));document.body.appendChild(frag);
console.log(document.body.innerHTML); //
```## Related Projects
[dom-builder](https://github.com/wrumsby/dom-builder)