Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/totallyinformation/ui.js
A small but powerful library for both the browser and node.js that takes standardised JSON input and converts to HTML making it very easy to create web pages without HTML coding.
https://github.com/totallyinformation/ui.js
converter html json low-code page-builder ui ui-builder web
Last synced: about 1 month ago
JSON representation
A small but powerful library for both the browser and node.js that takes standardised JSON input and converts to HTML making it very easy to create web pages without HTML coding.
- Host: GitHub
- URL: https://github.com/totallyinformation/ui.js
- Owner: TotallyInformation
- License: apache-2.0
- Created: 2023-09-01T16:38:13.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-01T17:14:58.000Z (over 1 year ago)
- Last Synced: 2024-07-30T19:29:05.009Z (5 months ago)
- Topics: converter, html, json, low-code, page-builder, ui, ui-builder, web
- Language: JavaScript
- Homepage:
- Size: 34.2 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ui.js
A small but powerful library for both the browser and node.js that takes standardised JSON input and converts to HTML making it very easy to create web pages without HTML coding.Originally written to support the [`node-red-contrib-uibuilder`](https://github.com/TotallyInformation/node-red-contrib-uibuilder) package for [Node-RED](https://nodered.org/), this is now made available as a standalone library for use in any project.
It rationalises the MANY quirks and inconsistencies of DOM handling but still stays close to standard HTML terminology so that learning the simple configuration data style used by the library will also help build better HTML knowledge and skills should you desire it. However, only a minimal understanding of HTML is needed.
Distribution versions are provided both for the browser (in both IIFE and ESM formats) and for Node.js (in both CommonJS and ESM formats).
To facilitate the Node.js builds, the `window` object must be passed to the class on instantiation. For Node.js, the `window` object must be provided by loading the [`jsdom`](https://github.com/jsdom/jsdom) library.
Two other optional functions may be passed to the class. One for custom logging and the other for doing syntax highlighting of JSON. If not provided, dummy functions are used that produce no output. For the custom logging function, it must be a function that returns a function; this is required to enable the log to reference the true source location of the log output instead of the location of the log function itself.