-
-
Notifications
You must be signed in to change notification settings - Fork 31
Description
The original version of Elm (IIRC) was supposed to be an abstraction over not just JS (providing a framework), but also HTML and CSS. That dream was watered down to just a better-than-js SPA framework... but after a while two libraries BOTH CALLED Elm-UI emerged, that sought to bring back the original proposition.
I think Tyrian would benefit from that too.
Essentially the idea is that Tyrian users (optionally) would no longer need to know any HTML, CSS, or JS. Instead they would get a pure scala, IDE discoverable IDE for making UIs. For a simple (made up, probably invalid) example, instead of making a button like this, where you just need to know a lot of stuff:
button(id := "my-button", onClick := Msg.DoSomething, styles := "background-color: #FF0000; border: 2px;")("Submit")You might get something like:
button("Submit")
.withId("my-button")
.onClick(Msg.DoSomething)
.withBackgroundColor(RGB.Red)
.withBorder(2)In this example, the mapping from html button stuff to scala API is fairly 1:1, but we can imagine providing, for example, a nice API for drawing shapes that spits out SVG.