The lazy UI framework. Get lazui ... do less ... deliver more.
Currently in early development.
introduction
- A JavaScript library that allows you to create interactive websites and single page apps with less work.
- Extends the attribute space of typical HTML to provide a rich set of functionality.
- Provides the JavaScript, so you don't have to.
all the things
{
type: 'WordTree',
options:{
maxFontSize: 20,
wordtree: {
format: 'implicit',
word: 'lazui'
}
},
data: [
['Phrases'],
['lazui as in pronounced lazy'],
['lazui as in lazy loading'],
['lazui as in do less and deliver more'],
['lazui has benefit less client side JavaScript to write'],
['lazui has benefit small core(7k minimized and compressed)'],
['lazui has benefit incremental loading'],
['lazui has benefit no virtual DOM'],
['lazui has benefit no build process'],
['lazui has benefit no custom server required'],
['lazui has benefit choice of multiple development paradigms'],
['lazui has benefit Markdown friendly'],
['lazui features attributes for styling and accessibility'],
['lazui features attributes for state management'],
['lazui features attributes for event management'],
['lazui features attributes for content loading and targeting'],
['lazui features attributes for content control'],
['lazui features without writing JavaScript ${templates in HTML}'],
['lazui features without writing JavaScript server sent events'],
['lazui features without writing JavaScript web sockets'],
['lazui features without writing JavaScript form processing'],
['lazui features without writing JavaScript client side routing'],
['lazui features without writing JavaScript Markdown transformation'],
['lazui features without writing JavaScript charts and gauges'],
['lazui features without writing JavaScript document table of contents'],
['lazui features without writing JavaScript remote data synchronization'],
['lazui features with writing JavaScript html template function'],
['lazui features with writing JavaScript render function'],
['lazui features with writing JavaScript custom attributes and controllers'],
['lazui features with writing JavaScript web components (custom elements)'],
['lazui features with writing JavaScript advanced configuration'],
['lazui features with writing JavaScript configurable bundling'],
['lazui features with writing JavaScript pre-built server'],
['lazui draws from htmx'],
['lazui draws from lighterHTML'],
['lazui draws from Turbo and Stimulus'],
['lazui draws from Vue'],
['lazui draws from Lit-Element'],
['lazui draws from Riot']
]
}
quick start
Load lazui
from a CDN
<script src="https://www.unpkg.com/@anywhichway/lazui"></script>
for HTML
<div data-lz:state="{clickCount:0}" onclick="this.getState().clickCount++">
Click Count: ${clickCount}
</div>
Click Count: ${clickCount}
<template id="goodbye">
Goodbye ${userName}
</template>
<div data-lz:src="#goodbye" data-lz:state='{userName:"John"}' data-lz:trigger="click dispatch:load" data-lz:target="outer">
Hello, ${userName}. The date and time is ${new Date().toLocaleTimeString()}. Click to leave.
</div>
Goodbye ${userName}!
Hello, ${userName}. The date and time is ${new Date().toLocaleTimeString()}. Click to leave.
<template data-lz:state="person">
{
name: "Mary",
age: 21,
married: false
}
</template>
<form data-lz:usestate="person" data-lz:controller="/controllers/lz/form.js">
<input data-lz:bind="name" type="text" placeholder="name">
<input data-lz:bind="age" type="number" placeholder="age">
<input data-lz:bind="married" type="checkbox"> Married
</form>
<div data-lz:usestate="person">${name}'s age is ${age}${married ? " and married" :""}.</div>
{
name: "Mary",
age: 21,
married: false
}
${name}'s age is ${age}${married ? " and married" :""}.
for JavaScript
<script>
const {render,html} = lazui;
let count = 0;
const clicked = (event) => {
count++;
event.target.innerText = `Click count: ${count}`;
};
render(document.currentScript,
html`<div onclick=${clicked}>Click count: ${count}</div>`,
{where:"afterEnd"});
</script>
Ok, now it's time to dive in!