Minimal JavaScript UI Library
Go to file
Geoff Doty 5b9b2c2624 simplified 2024-05-05 09:07:17 -04:00
dist simplified 2024-05-05 09:07:17 -04:00
src simplified 2024-05-05 09:07:17 -04:00
test update api better to match existing standards 2024-05-04 20:47:34 -04:00
.gitignore first pass 2024-05-04 20:34:27 -04:00
LICENSE Initial commit 2024-05-04 20:31:29 -04:00
README.md simplified 2024-05-05 09:07:17 -04:00
makefile added makefile 2024-05-04 21:14:01 -04:00

README.md

Tagged

Minimal Javascript UI Library

This is an experimental composable ui builder that takes ideas from Elm Architecture, but without the doctrine - this is Javascript!

Features

  • No Virtual Dom
  • No Build System
  • No Over Engineering
  • ~1kb minified
  • Totally INEFFICIENT rendering (at scale)

Overview

the app builder takes an opts object that expects:

  • state as initial data {object}
  • actions as {object} with functions definitions
  • view as {function} that returns valid dom
  • mount as querySelector compatible {string}

app returns:

  • state current of component as updatable function
  • actions to call on component

Example

    <script type="module">
        import {app, h} from "./tagged.min.js";

        const myapp = app({
            state: {name: "[Your Name Here]", job: "Developer"},
            view(state, actions) {
                return h("main", [
                    h("strong", `Greeting from ${state.name}`),
                    h("div", `Your local ${state.job}`),
                    h("div", {id: "test"}, [
                        h("h1", "Hello Tagged"),
                        h("p", 21),
                        h("hr")
                    ])
                ]);
            }
        }, "#main");
    </script>

    <main id="app"></main>

Inspired By

  • hyperapp
  • Elm Architecture

Notes

WORK-IN-PROGRESS