0.1.6 • Published 8 months ago

html-builders v0.1.6

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Html builders

Simple helper library to build HtmlElements for engineers that know what they are doing.

It constructs html elements using simplified API with a dedicated functions for elements.

  • No compilation
  • No dependencies
  • No magic
  • Full typescript support

Format

createElement(tagName, { attributes }, ...children)

Or use can use helper class to create standard html elements

tagName({ attributes }, ...children)

Example

const element = div(
  { class: "my-div", style: { width: "400px", margin: "0 auto" }},
  p("Hello world!"),
  button({ class: "my-button" }, "Click me!")
);

document.appendChild(element);

Inspired by hyperscript-helpers.

License: MIT

0.1.6

8 months ago

0.1.5

10 months ago

0.1.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.4

1 year ago

0.1.3

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago