# @cspoels/element

> Tiny and quick way to create DOM elements

Latest version **0.3.0** (published 2019-07-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install @cspoels/element
pnpm add @cspoels/element
yarn add @cspoels/element
bun add @cspoels/element
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2019-07-18 |
| First published | 2019-04-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | cspoels |
| Keywords | dom, element, quickfix |

## Links

- npm: https://www.npmjs.com/package/@cspoels/element
- Repository: https://github.com/cspoels/Element
- Homepage: https://github.com/cspoels/Element#readme
- Issues: https://github.com/cspoels/Element/issues
- npm.io page: https://npm.io/package/@cspoels/element

## Recent versions

- 0.3.0 (latest) — 2019-07-18
- 0.2.0 — 2019-07-18
- 0.1.0 — 2019-07-18
- 0.0.4 — 2019-07-18
- 0.0.3 — 2019-07-18
- 0.0.2 — 2019-04-24
- 0.0.1 — 2019-04-24

## README

# @cspoels:element

## Install

```
yarn add @cspoels/Element
```


## Use
To start, load the script
```js
const Element = require('@cspoels/element')
```

To create a new element in the body of the document
```js
let element = new Element(document.body).create()
```

An element will be created, it will remember the root for appending alter. The root parameter can be 
 - A string: To search by id
 - A DOM element to appen dto
 - Another Element instance
 - [Default] null, will transform to document.body

you can alter the element with functions as:
```js
element.class('is-primary').id('super-element').text('I am the best element')
```

---
_Source: https://npm.io/package/@cspoels/element · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
