Introduction
vUX is a dependency-free UI library for the browser, written in plain ES6 modules. You import the modules you need straight from a <script type="module">, with no build step, no bundler and no package manager.
What you get
vUX covers three kinds of work:
- Your own components. Component turns a
<template>you wrote into live instances with field, attribute, event and class bindings, keyed lists and teardown. Store holds the data several components share and keeps them in step. DataView binds rows of data to a table. - Ready-made widgets. Dialogs (Prompt, Modal Displayer), notifications (MessageBox), loading screens (Skeleton, Progress Indicator, FontSplash), forms (Form Components, FormValidator), motion (Carousel, Marquee), drawing (SketchPad, CShapes) and more.
- Apps. SPA Engine routes a single-page application, with route parameters, sections, caching and scroll restore. The core utilities (
$$) cover selection, classes, slides, tweens and delegated events.
How it is different
- Your markup stays yours. Components are ordinary elements carrying your classes, styled by your stylesheet. Nothing is hidden in a shadow root, and
document.querySelectorreaches everything. - Nothing re-renders. A binding is written when its value changes, and nothing happens in between. There is no virtual DOM and no scheduler. See vUX and React for how the ideas map.
- Mistakes throw early. Every constructor, method and
configproperty checks its argument and throws an error that names the method and says what it expected. - One way to drive every module. Create it with
new, set.config, callinitialize(), and calldestroy()when it goes. See Lifecycle and teardown.
Where to go next
- Installation: add vUX to a page.
- Your first component: build a small component from your own markup.
- Examples: every module running live.