0.1.0 • Published 10 months ago

tesselation v0.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

Tesselation

This module is a work in progress.

A frontend library for building web interfaces with flexible tiling panels.

Installation

$ npm install tesselation

Serving with express

// Serves js module files under http://127.0.0.1:3000/tesselation

const express = require("express")
const tesselation = require("tesselation")

const app = express()

app.use("/tesselation", tesselation.serve())

express.listen(3000)

Classes

Element

Provides a quick way to create DOM elements.

import Element from "/tesselation/Element.mjs"

const div = new Element("div", {
  classes: ["wrapper", "main"],
  attributes: {
    title: "Hello, World",
    style: "background: #000;"
  },
  dataset: {
    foo: "bar"
  }
})

// Resulting element in HTML syntax:
//
// <div
//   class="wrapper main"
//   title="Hello, World"
//   style="background: #000;"
//   data-foo="bar"
// ></div>
0.1.0

10 months ago