u1js is a web-browser JavaScript library for display and interacting with web applications using UINL as the UI interaction language.
![]()
Is u1js just another JS framework?
In its focus to make human software usable by machine agents, UINL aims to eliminate non-task-essential design choices (e.g. font type/size may be irrelevant for many task types), leaving those to be optionally specified via customizable templates (e.g. CSS).
Is u1js just for client-side applications?
More details on UINL may be found at https://uinl.github.io (repo at https://github.com/uinl/uinl).
<html><head><script src="https://cdn.jsdelivr.net/gh/uinl/u1js/u1.min.js"></script><script>
// on start (i.e., when handshake message is received)
app.start(event=>{
app.display({
value:[ // value (or v) sets the content value
'Hello World!', // 'Hello World!' text label
{class:'btn',id:'Click Me'} // 'Click Me' button
]
});
});
// when button "Click Me" is clicked
// u refers to unique id of user-event target element
// v refers to the value of target element (for a button v:true signifies a click)
app.event({u:'Click Me',v:true},event=>{
app.display({
add:[ // add (or A) adds to current content value
'You clicked the button!' // add text label to display
]
})
});
</script></head><body></body></html>
See client-side u1js app examples live:
<html><head><script src="https://cdn.jsdelivr.net/gh/uinl/u1js/u1.min.js"></script><script>
const app = {
method: 'POST',
location: 'https://uinldemo.ue.r.appspot.com/'
}
</script></head><body></body></html>
See this example live:
<html><head><script src="https://cdn.jsdelivr.net/gh/uinl/u1js/u1.min.js"></script><script>
const app = {
method: 'GET',
location: 'https://uinl.github.io/u1js/helloworld.json'
}
</script></head><body></body></html>
See this example live: