I want to define an input with extended attributes using the "data-" notation. So for example to define:
<input type="radio" id="3" data-extra="three"/>
Is there a way to do this in Scalatags?
You can use "data-extra".attr to create custom attributes. For example
"data-extra".attr
input(tpe := "radio", id := "3", "data-extra".attr := "three")
Now even
input(tpe := "radio", id := 3, data.extra := "three")
The most convinient way is to use data(...):
data(...)
input(tpe := "radio", id := 3, data("extra") := "three")
You can use
"data-extra".attr
to create custom attributes. For example