Skip to content
This repository has been archived by the owner on Sep 25, 2021. It is now read-only.

rasmusmerzin/tyne

Repository files navigation

Deprecated

I recommend Mithril.js instead.

Tyne

Downloads Version License

A tiny JavaScript framework for building UI with minimal overhead.

Example

Following JavaScript...

select(["head", "get", "post"])

will generate following HTML.

<select>
  <option value="head">head</option>
  <option value="get">get</option>
  <option value="post">post</option>
</select>

To add inline style...

js

select(["head", "get", "post"], {
  style: { textTransform: "uppercase" }
})

html

<select style="text-transform: uppercase">
  <option value="head">head</option>
  <option value="get">get</option>
  <option value="post">post</option>
</select>

To add generated element to document...

const methodType = select(["head", "get", "post"], {
  style: { textTransform: "uppercase" }
})
document.body.appendChild(methodType);

or shorthand version

select(["head", "get", "post"], {
  style: { textTransform: "uppercase" }
}, document.body)

Example Projects

About

A tiny JavaScript framework for building UI with minimal overhead.

Resources

License

Stars

Watchers

Forks