<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/elementaryui-swift-in-the-browser-hk285jwwh" -->

---
title: ElementaryUI – Swift, in the Browser | daily.dev
description: ElementaryUI is a Swift frontend framework that runs in the browser using WebAssembly. It offers SwiftUI-inspired APIs, built-in reactivity, and tiny binaries....
canonical: https://daily.dev/posts/elementaryui-swift-in-the-browser-hk285jwwh
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: ElementaryUI – Swift, in the Browser | daily.dev
og:description: ElementaryUI is a Swift frontend framework that runs in the browser using WebAssembly. It offers SwiftUI-inspired APIs, built-in reactivity, and tiny binaries....
og:url: https://daily.dev/posts/elementaryui-swift-in-the-browser-hk285jwwh
og:image: https://api.daily.dev/og/posts/hK285Jwwh.png
og:image:alt: ElementaryUI – Swift, in the Browser
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# ElementaryUI – Swift, in the Browser

**[Hacker News](https://daily.dev/sources/hn)** · 1 min read · 0 upvotes · 0 comments

## Summary

ElementaryUI is a Swift frontend framework that runs in the browser using WebAssembly. It offers SwiftUI-inspired APIs, built-in reactivity, and tiny binaries. A sample component shows a `@View` struct with `@State` for counting, rendering emoji hearts and buttons with `.onClick` handlers to increment or reset a counter.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://elementary.codes>

## Questions this post answers

### Is there a way to write frontend web UI code in Swift instead of JavaScript?

Yes, ElementaryUI is a Swift frontend framework that compiles to WebAssembly and runs in the browser. It uses SwiftUI-inspired APIs with property wrappers like '@View' and '@State', built-in reactivity, and produces tiny binaries, letting you write components such as buttons and conditional views in Swift syntax.

_Developers weighing Swift-to-web options can track frameworks like this one on daily.dev._

## Community take

How the wider developer community reacted, aggregated from 3 discussions and 39 comments across hackernews (as of 2026-10-30).

**TL;DR:** Reaction is mostly curiosity and nostalgia-driven comparisons (to Cappuccino, Blazor) rather than strong consensus, with some skepticism about Swift's value outside Apple's ecosystem and genuine technical questions about performance and purpose.

**Sentiment:** 25% positive · 45% mixed · 30% skeptical

**The case for**

- Some see value in sharing logic between web and native iOS/Android apps using one language.
- The project's author actively engaged, explaining motivation and sharing performance benchmark data.
- A few feel Swift is a clean, powerful, programmer-friendly language well suited to this space.

**The pushback**

- Several question the purpose given existing solutions like TypeScript already cover the need.
- Concern that depending on Apple's language/tooling for cross-platform web work is risky if Apple's priorities shift.
- Bundle size and demo reliability (e.g. hydration failures in Firefox) were flagged as weak points.
- Some dismiss Swift's technical merits outright, citing perf comparisons to Objective-C/UIKit.

**By community**

- hackernews (mixed): Comments ranged from nostalgic comparisons to older frameworks, skepticism about the need for another language-to-web bridge, and genuine technical curiosity, with the author stepping in to clarify motivations and benchmarks.

**Hottest debate:** Whether tying a web framework to Swift and Apple's ecosystem is a smart long-term bet or a risky dependency.

**Open questions**

- What concrete performance or maintainability benefits does Swift-in-the-browser offer over existing JS/TS frameworks?
- How will bundle size and WASM module splitting be addressed going forward?

**Highlights**

> ElementaryUI author here. The honest original motivation was mostly "Swift for websites, can I do it?". But underneath, I really want to use one capable and modern language (+ ecosystem and tooling) for all my dev needs. That includes having a native, "in-ecosystem" solution for creating web apps of any kind. Somebody's gotta build it... I recently wrote a bit about that on the swift.org blog: https://www.swift.org/blog/whats-new-in-swift-august-2026/
> — [simonleeb on hackernews](https://news.ycombinator.com/item?id=50301688)

> ElementaryUI author here: It is listed in the js framework benchmark (as elementaryui), so you can check where it lands performancewise ATM: https://krausest.github.io/js-framework-benchmark/current.ht... I am convinced we can keep it "fast enough" for most everything. Bundle size still is a weak spot, and proper bundling/splitting of wasm modules has to be willed into existence, but I see no blockers for a pretty smooth experience. Honestly, it mostly started as a "I like Swift, can I use it everywhere?" challenge. But there is a real benefit about fully staying in a modern language and tooling environment. Swift, imho, is a very clean and powerful language that fits this space well, might as well build a comfortable way to use it for web projects.
> — [simonleeb on hackernews](https://news.ycombinator.com/item?id=50301919)

> ElementaryUI author here (so biased): I agree that is a real risk, but imho past behavior suggests that "Apple" Apple and open-source Apple both can exist and it's likely going to be just fine. On the plus side: Apple is paying many many real people to progress the language and tooling mostly in the open with solid community work.
> — [simonleeb on hackernews](https://news.ycombinator.com/item?id=50301756)

> It would be interesting to see any benchmarks / comparisons to understand what are the benefits of having Swift in the browser. Is it faster? Easier to maintain? Or is it based more on the sympathy to the programming language in general? But great job anyway!
> — [gosen on hackernews · 1 comments](https://news.ycombinator.com/item?id=50300923)

> New versions of Swift are truly cross-platform. We support iOS, iPadOS, MacOS, HomeOS, VisionOS, WatchOS as well as BodyOS, BrainOS and iThinkOS. To help developers focus on the future, Swift 9 drops support for deprecated platforms such as Linux, Windows and the web. /s I'm actually a Swift developer; it's a great language, but I'm also married to the Apple ecosystem and wouldn't choose it outside of it.
> — [earthnail on hackernews](https://news.ycombinator.com/item?id=50301655)

**Source threads**

- [hackernews](https://news.ycombinator.com/item?id=50295821) · 103 points · 39 comments
- [hackernews](https://news.ycombinator.com/item?id=46526052) · 5 points · 0 comments
- [hackernews](https://news.ycombinator.com/item?id=49570376) · 1 points · 0 comments

## Similar posts on daily.dev

- [Issue 741 – iOS Dev Weekly](https://daily.dev/posts/issue-741-ios-dev-weekly-rxpxc5gjy) · iOS Dev Weekly · 0 upvotes · 0 comments
- [Microsoft.UI.Reactor: a C\#-first way to build WinUI apps](https://daily.dev/posts/microsoft-ui-reactor-a-c--first-way-to-build-winui-apps-lquagzmoy) · DevBlogs · 38 upvotes · 2 comments

---

Tags: [#swift](https://daily.dev/tags/swift), [#webassembly](https://daily.dev/tags/webassembly), [#swiftui](https://daily.dev/tags/swiftui)

[View this post on daily.dev](https://daily.dev/posts/elementaryui-swift-in-the-browser-hk285jwwh)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"ElementaryUI – Swift, in the Browser","url":"https://daily.dev/posts/elementaryui-swift-in-the-browser-hk285jwwh","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/elementaryui-swift-in-the-browser-hk285jwwh"},"datePublished":"2026-10-30T01:06:49.437Z","dateModified":"2026-10-30T10:37:41.103Z","description":"ElementaryUI is a Swift frontend framework that runs in the browser using WebAssembly. It offers SwiftUI-inspired APIs, built-in reactivity, and tiny binaries....","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/0e68322d6b63215bdfb55ebff3638639?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/0e68322d6b63215bdfb55ebff3638639?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Hacker News","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Hacker News","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/hn","url":"https://daily.dev/sources/hn"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/elementaryui-swift-in-the-browser-hk285jwwh","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"swift,webassembly,swiftui","timeRequired":"PT1M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Hacker News","item":"https://daily.dev/sources/hn"},{"@type":"ListItem","position":3,"name":"ElementaryUI – Swift, in the Browser"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/elementaryui-swift-in-the-browser-hk285jwwh#faq","mainEntity":[{"@type":"Question","name":"Is there a way to write frontend web UI code in Swift instead of JavaScript?","acceptedAnswer":{"@type":"Answer","text":"Yes, ElementaryUI is a Swift frontend framework that compiles to WebAssembly and runs in the browser. It uses SwiftUI-inspired APIs with property wrappers like '@View' and '@State', built-in reactivity, and produces tiny binaries, letting you write components such as buttons and conditional views in Swift syntax. Developers weighing Swift-to-web options can track frameworks like this one on daily.dev."}}]}
```

