Soarsoft Web DSL - Alpha v0

This page is generated by the Soarsoft Web DSL

Benefits

A concise, pragmatic DSL that mirrors HTML while preserving Kotlin compile-time safety.

Preview of current DSL (v0)

| html {
|   head {
|       title { "Hello World" }
|   }
|   body {
|       h1 { "Hello World" }
|       div { ... }
|       p { span { "Hello World" }; a { "Link" }; "Text"}
|   }
| }

Current state and limitations

What works today and what's still missing.

Production goal DSL structure (v4)

| html {
|   head {
|       title { "Hello Once Again" }
|       style { ... } // Using a stylesheet DSL
|       meta(charset = "UTF-8") // Attributes are named parameters
|       meta(name = "viewport", content = "width=device-width, initial-scale=1.0")
|       link(rel = "stylesheet", href = "/assets/main.css")
|   }
|   body {
|       div(id = "root") { ... }
|       div(classes = { "big" + "rounded" }) { ... }
|       a(href = "https://soarsoft.co", target = "_blank") { ... }
|       br // [br, linebreak, br()] all possible 
|   
|       // The `attrs` parameter will allow for more complex attribute setting
|       script(attrs = { defer; module; async }, src = "/assets/main.js") { ... }
|   }
| }

v4 goals

Major milestones planned for a production-ready release.