ruitl 0.2.2

Template compiler for type-safe, server-rendered HTML components in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Button.ruitl - A simple button component

component Button {
    props {
        text: String,
        variant: String = "primary",
    }
}

ruitl Button(text: String, variant: String) {
    <button class={format!("btn btn-{}", variant)} type="button">
        {text}
    </button>
}