
ElementaryUI – Swift, in the Browser
Run declarative Swift applications natively in the browser with WebAssembly
以下正文同步自 Hacker News,版权归原站所有,已转换为易读排版。
Run declarative Swift applications natively in the browser with WebAssembly
Familiar and intuitive syntax for building web UIs
Automatic state management with @State, @Environment, and @Reactive
Full Embedded Swift support means kB-sized wasm bundles instead of MB
Powerful CSS-based animation system including automatic FLIP transitions
Fast dev server with hot reload for rapid iteration
@View struct LoveCounter { @State var count = 1
var body: some View { p { String(repeating: "❤️", count: count) }
if count < 10 { button { "More Love" } .onClick { count += 1 } } else { p { "Enough love for you!" } button { "Less Love" } .onClick { count = 1 } } } }
Thank you to everyone supporting this open‑source project financially. Please consider joining them by sponsoring ElementaryUI.
正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。