WINGS
Web IN Go Sphere

Live Demo — try it in your browser, no install needed.
Or run locally: clone the repo, cd live-demo && bash build.sh && go run serve.go
or jump to the Quick Start / Full Example
Build reactive Web Components in pure Go — no JavaScript framework required.
WINGS compiles to WebAssembly and gives you custom HTML elements with
automatic data binding, conditional rendering, array iteration, two-way
form binding, hash-based routing, and parent-child communication — all
authored in Go and running natively in the browser.
Why WINGS?
| |
|---|
| Pure Go | Write components, state, and logic entirely in Go. Templates stay in plain HTML. |
| Reactive | Change a value with Set() and the DOM updates automatically — no virtual DOM diffing overhead. |
| Lightweight | Direct DOM manipulation via targeted refs. No framework runtime to download beyond your WASM binary. |
| Encapsulated | Each component lives inside a Shadow DOM with scoped CSS — no style leaks, no naming collisions. |
| Two-Way Binding | The & prefix syncs <input>, <select>, <textarea>, and custom elements with your Go data map in both directions — with optional typed parsing and validation in pure Go. |
| Hash Routing | Built-in {{#}} binding and wings.GoTo() for SPA navigation without a router library. |
| Composable | Nest components freely. Parent-to-child data flows via attributes; child-to-parent events flow via @ triggers. |
| Standard Web | Uses native Custom Elements v1 and Shadow DOM — works alongside any existing page or framework. |
| Internationalized | Build-time text extraction + runtime catalog lookup, with plural/gender flexion and locale-aware number/date/measure formatting. |
| Themeable | Global --wings-* design tokens; compose multiple runtime skins (colours, geometry, depth, motion, atmosphere, material form). |
| Testable in-web | Wrap any widget in <w-test> to spy its events and seal a pass/fail; modules declare self-tests via Testable(), and <w-test-report> collects the whole page (auto + visual) into one JSON report. |
| Zero-toolchain dev | A Docker dev container recompiles your wings.wasm and serves it on every save — iterate with no Go toolchain on the host, or run the same loop natively. |
What's New
Release highlights — full history in CHANGELOG.md.
v0.28.0
- A style created from a selection carries the document's own
formatting. With a book's stylesheet now preserved, most of an
imported document's look comes from rules that were never registered
classes, so pressing ✎ over a drop cap produced a style missing the
very face that prompted it.
EditorCore.StyleLayersAt reports what
actually styles a point, and the merge honours !important.
v0.27.0
- A CSS inspector for
w-text — the new inspect attribute adds a
toolbar toggle; hovering the text then lists the selectors in effect at
that point. It is the companion to carrying a book's own stylesheet:
most of an imported document's formatting comes from rules nobody can
apply or remove, and this is how they become findable. It found two
bugs on its first outing, both fixed here.
v0.26.0