{"id":35222958,"url":"https://github.com/elementary-swift/elementary-ui","last_synced_at":"2026-04-16T11:03:08.771Z","repository":{"id":258496254,"uuid":"864956569","full_name":"elementary-swift/elementary-ui","owner":"elementary-swift","description":"Build SwiftUI-style apps that run in the browser","archived":false,"fork":false,"pushed_at":"2026-04-10T12:24:27.000Z","size":1034,"stargazers_count":379,"open_issues_count":4,"forks_count":10,"subscribers_count":9,"default_branch":"main","last_synced_at":"2026-04-10T14:13:26.776Z","etag":null,"topics":["frontend","swift","swiftui","wasm","web","webassembly"],"latest_commit_sha":null,"homepage":"https://elementary.codes","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elementary-swift.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["sliemeobn"]}},"created_at":"2024-09-29T16:06:17.000Z","updated_at":"2026-04-10T12:21:02.000Z","dependencies_parsed_at":"2026-02-23T09:03:40.293Z","dependency_job_id":null,"html_url":"https://github.com/elementary-swift/elementary-ui","commit_stats":null,"previous_names":["sliemeobn/elementary-dom","elementary-swift/elementary-ui"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/elementary-swift/elementary-ui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elementary-swift%2Felementary-ui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elementary-swift%2Felementary-ui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elementary-swift%2Felementary-ui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elementary-swift%2Felementary-ui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elementary-swift","download_url":"https://codeload.github.com/elementary-swift/elementary-ui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elementary-swift%2Felementary-ui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31880882,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T09:23:21.276Z","status":"ssl_error","status_checked_at":"2026-04-16T09:23:15.028Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["frontend","swift","swiftui","wasm","web","webassembly"],"created_at":"2025-12-30T00:33:44.357Z","updated_at":"2026-04-16T11:03:08.765Z","avatar_url":"https://github.com/elementary-swift.png","language":"Swift","funding_links":["https://github.com/sponsors/sliemeobn"],"categories":["Swift"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://elementary.codes\"\u003e\n    \u003cimg src=\"https://elementary-swift.github.io/assets/elementary-logo.svg\" width=\"125px\" alt=\"Elementary Logo\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n# ElementaryUI - A Swift Frontend Framework\n\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Felementary-swift%2Felementary-ui%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/elementary-swift/elementary-ui)\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Felementary-swift%2Felementary-ui%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/elementary-swift/elementary-ui)\n\n## Features\n\n- 🌐 **Swift in the Browser** - Run declarative Swift applications natively in the browser with WebAssembly\n- 🎨 **SwiftUI-inspired APIs** - Familiar and intuitive syntax for building web UIs\n- ⚡ **Built-in Reactivity** - Automatic state management with `@State`, `@Environment`, and `@Reactive`\n- 📦 **Tiny Binaries** - Full Embedded Swift support means kB-sized wasm bundles instead of MB\n- ✨ **Magical Animations** - Powerful CSS-based animation system including automatic FLIP transitions\n- 🚀 **Vite-Powered Development** - Fast dev server with hot reload for rapid iteration\n\n\u003cbr\u003e\n\n```swift\n@View\nstruct Counter {\n    @State var count = 0\n    \n    var body: some View {\n        div {\n            p { \"Count: \\(count)\" }\n            button { \"Increment\" }\n                .onClick { count += 1 }\n        }\n    }\n}\n```\n\n## Guides \u0026 Documentation\n\n- **Guide \u0026 Get Started**: [elementary.codes](https://elementary.codes)\n- **API docs**: [Swift Package Index](https://swiftpackageindex.com/elementary-swift/elementary-ui/documentation)\n\n\u003e [!NOTE]\n\u003e ElementaryUI is an actively developed passion project in its early days.\n\u003e Expect sharp edges, APIs may change, and things may break as I balance performance, ergonomics, and feature set.\n\u003e\n\u003e The ambition is simple: make Swift a first-class option for building serious web applications, and keep the project healthy for the long run.\n\n\u003cp align=\"center\"\u003e\n  \u003ci\u003eThank you to everyone supporting this open‑source project financially.\n  \u003cbr\u003ePlease consider joining them by \u003ca href=\"https://github.com/sponsors/sliemeobn\" target=\"_blank\" rel=\"noopener\"\u003esponsoring ElementaryUI\u003c/a\u003e.\u003c/i\u003e\n  \u003ca href=\"https://elementary.codes#sponsors\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(width \u003c= 600px)\" srcset=\"https://elementary.codes/sponsors/sponsors-400.svg\" /\u003e\n    \u003csource media=\"(width \u003c= 800px)\" srcset=\"https://elementary.codes/sponsors/sponsors-600.svg\" /\u003e\n    \u003cimg src=\"https://elementary.codes/sponsors/sponsors-800.svg\" alt=\"Sponsors\" /\u003e\n  \u003c/picture\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## Example\n\n[Check out the \"Swiftle\" demo app](/Examples/Swiftle/)\n\n## 🚧 Work In Progress 🚧\nBased on the [swift.org WebAssembly SDKs](https://forums.swift.org/t/swift-sdks-for-webassembly-now-available-on-swift-org/80405), [JavaScriptKit](https://github.com/swiftwasm/JavaScriptKit), and [Elementary](https://github.com/elementary-swift/elementary).\n\nSwift 6.3 or later with matching *Swift SDKs for WebAssembly* from [swift.org](https://www.swift.org/install) is required.\n\n### Things to figure out\n\n- ~~identity system and list-diffing~~\n- ~~lifecycle events and proper \"unmounting\" (currently nodes are just \"dropped\")~~\n- ~~@State system~~\n- ~~typed event handlers~~\n- ~~@Environment system~~\n- ~~dependencies on versioned packages (i.e., build without unsafe flags)~~\n- ~~fix DOM not child-diffing to preserve animations/nodes (the current solution based on `replaceChildren` will not work, it seems)~~\n- ~~\"model-bindings\" for inputs (i.e., bind a @Binding\u003cString\u003e to a text box, or bind a @Binding\u003cBool\u003e to a checkbox)~~\n- ~~view value comparing (generated comparing and custom equatable support)~~\n- ~~different handling of environment (individual reactivity needed)~~\n- ~~transitions and animations (ideally CSS-based, probably svelte-like custom easing functions applied through WAAPI)~~\n- ~~better control over animations~~\n- ~~somehow migrate over to \"var body\" instead of \"var content\" (what was I thinking....)~~\n- ~~automatic FLIP animations for certain layout changes (child-layout after changes, maybe size of containers)~~\n- ~~fix those Foundation imports, review thread-local + mutex usage~~\n- more built-in animatable CSS modifiers (colors, borders, blur)\n- basic phaseAnimator implementations\n- implement auto-flip animation for custom CSS values (on value triggers)\n- maybe add \"animateContainerLayout\" modifier with value trigger (eg: to animate changes without child-changes)\n- support for combined and reversible transitions\n- multi-select bindings (options, radio-buttons, tagged check boxes, ...)\n- more unit testing (FLIP handling, animations, reactivity, ...)\n- implement @ViewEquatableIgnored\n- split out JavaScriptKit stuff in separate module to contain spread, maybe one day we can switch to faster interop somehow\n- ~~add basic docs, a good intro readme, and push a 0.1 out the door! (probably best to wait for Swift 6.2 to drop)~~\n- a router implementation (probably in extra module?)\n- maybe conditionally support @Observable for non-embedded builds?\n- ~~figure out why `@Environment` with optional `ReactiveObject` does not build in embedded~~\n- preference system (i.e., bubbling up values)\n- embedded-friendly Browser APIs (Storage, History, maybe in swiftwasm package with new JavaScriptKit macros)\n- ~~think about how to deal with the lack of `Codable` in embedded (wait for new serialization macros)~~\n- ~~make printing work without WASI (maybe pipe putchar through to JavaScript?)~~\n- isolation and @MainActor stuff for reusable types (server-side rendering and client apps - probably never quite possible to have same types render \"multi-threaded\" server side and stay single-threaded client side....)\n- ~~decide whether the current idea of `Views` flattening themselves into renderable types is even necessary, or if views should just \"apply\" themselves into the reconciler - might be a bit messier, but maybe faster and more flexible~~\n- ~~move all elementary repos under one project roof and use a traits-based, single \"ElementaryUI\" top-level package (or similar)~~\n\n### Embedded Swift for WASM waitlist\n\n- Codable 2.0 (we need JSON handling for embedded, on [the horizon](https://forums.swift.org/t/the-future-of-serialization-deserialization-apis/78585))\n- ~~simple build with SwiftPM (wasm-ld)~~\n- ~~\\_Concurrency module (Task)~~\n- ~~Synchronization (Mutex)~~\n\n## License and Derived Code\n\nThis package is generally licensed as [Apache 2](LICENSE).\n\nThe `Reactivity` module is inspired by the Swift stdlib's `Observation` framework, and code in `ReactivityMacros` is directly derived from it ([source](https://github.com/swiftlang/swift/tree/main/lib/Macros/Sources/ObservationMacros)).\nFind a copy of the Swift.org open source project license [here](LICENSE-swift_org.md).\n\nThis repo also contains the [BrowserRuntime](BrowserRuntime) JavaScript package which bundles source code from [JavaScriptKit](https://github.com/swiftwasm/JavaScriptKit) (see [license](./BrowserRuntime/LICENSE.md))\n\n---\n\n*SwiftUI is a trademark of Apple Inc. This project is not affiliated with or connected to Apple in any way.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felementary-swift%2Felementary-ui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felementary-swift%2Felementary-ui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felementary-swift%2Felementary-ui/lists"}