component Temperature < State{
number celsius: 0
}
component TemperatureConverter < PageView{
static any[] use = [Content]
Temperature temperature: Temperature{ id: temperature }
Content{
H1`Temperature Converter`
T`Celsius: `
Input{
type = "number"
placeholder = "Celsius"
value = temperature.celsius
on input:() => {temperature.celsius = this.currentValue}
}
P{
T{ text: `${temperature.celsius}°C = ` }
T{ text: `${(temperature.celsius * 9/5) + 32}°F` }
}
}
}
A language extension to javascript and typescript that that lets you build front-end user interfaces without using XML-like languages.
Live Elements brings 2 big advantages:
Since Live Elements is build on top of javascript, you don't have to learn an entire programming language from scratch. Live Elements doesn't aim to rethink for loops or variable declarations, instead it aims to add concepts with significant impact.
You can start either by learning about the language, or by going through practical guides.
You can try all the examples below directly in the playground
Hello world example.
import live-web.dom
import live-elements-web-server.view
// component Hello extends PageView
component Hello < PageView{
// create <div>
Div{
// create <h1>Hello from Live Elements</h1>
H1`Hello from Live Elements`
}
}
Live elements is split into 2 main repositories:
Repository with web packages for live elements, including:
The compiler package, which compiles live elements-code to javascript.
Previously, issues were managed privately on GitLab as it was easier to handle at the time. However, to simplify contributions and collaboration, everything has been moved to GitHub. From now on, all issues will be tracked on GitHub, so feel free to suggest features, report bugs, or share your ideas.