Bindings - metincetin/Karbid GitHub Wiki

You can bind the attributes to a javascript expression adding ! before the attribute.

!attributeName: value

Note Loop bindings are not supported yet.

Example

In this example, Hello World's background color will be changed as the the input changed.

@input#color{
    placeholder:"Enter a color value"
}

@{
    html:"Hello world"
    !background-color:karbid.elements.color.value
}