Skip to content
Design system

Design system

The Webclient design system is the supported way for client Apps to describe their user interface. For now the Shell owns the browser DOM and renders App interfaces from a Shell-defined component tree.

Composition model

The App’s Wasm module is the source of truth for its UI state. It describes the interface using components from the Shell’s design-system catalog and sends diffs or patches as that state changes. The Shell validates each update and applies it to the component tree it owns. User actions cause events that are given back to the Wasm app.

This keeps App logic separate from DOM ownership: Apps request UI changes, while the Shell decides what is valid and performs the rendering. The app are not providing raw HTML and are not allowed to use JavaScript. That has 2 reasons:

  • Security: That app must not execute (JavaScript) code in the browser, so it can not read data it doesn’t have access to.
  • Platform independence: Probably a mobile or desktop app is wanted in the future. By using an abstract component description they can be rendered differently in a different environment.

Interaction events

Apps declare listeners on supported components. When a user interacts with one—for example, clicking a button—the Shell sends the corresponding named event to that App’s worker. The App updates its own state and can send another UI patch. The bridge carries these updates and events. The concrete message schema is still being defined.

Theme and assets

The Shell owns the visual design and theme. Apps may set only a limited set of styling tokens, such as an accent color. App icons, titles, and other graphics come from static assets in the App package, served or mediated by the Host and Shell.

Validation and open details

The Shell is part of the trusted computing base: it validates and sanitizes App UI declarations before rendering them. App code cannot bypass that boundary to manipulate the DOM directly. Client Wasm runs in a dedicated worker with bridge-only imports. the Shell controls Wasm instantiation and the import object.

The following details remain to be specified:

  • The UI declaration, patch format, and design-system interface definition.
  • Patch validation rules and the supported component catalog.
  • Event payload schemas and how callbacks map to named App events.
  • The accessibility contract for Shell components and App-provided content.
  • The limited set of styling tokens Apps may control.

OpenUI Lang as a possible format

OpenUI Lang is a compact, line-oriented language for describing interfaces, with parsing designed to support incremental streaming. It is not a component library and it is not JSON. An application defines its component library and properties, a parser converts OpenUI Lang into a typed element tree, and a renderer maps that tree onto the application’s own components. OpenUI is open source under the MIT license (repository and license).

OpenUI Lang also supports expressions, functions, actions, and query/mutation forms. Any integration would need to define a restricted subset. Component actions could map to declared named App events, but generated UI must not gain direct access to tools, capabilities, or Host APIs. Query and mutation support would require separate capability and consent decisions. OpenUI was originally made for AI-generated UI, but ordinary Apps can use the same component model without AI.

Evaluating this option involves interface design and engineering questions:

  • Can the Shell component catalog be expressed as an OpenUI Lang library without weakening its validation rules?
  • Should the Shell accept OpenUI Lang directly, or should Apps translate it to the project’s own patch format?
  • Which subset of the language is needed, and how should unsupported expressions or components fail safely?
  • Can the existing JavaScript/TypeScript parser and renderer fit the Shell, or would a compatible implementation be needed?
  • How should streaming updates, actions, accessibility, and component-version compatibility work?

The OpenUI Lang specification and parser/runtime repository provide starting points for evaluating these questions. No decision to adopt OpenUI Lang has been made.

Related formats and renderer support

Several projects explore declarative UI descriptions rendered through an application’s own component catalog. Their renderer support shows how a shared description could target different web frameworks or native platforms, but each renderer is a separate implementation; components and catalogs are not automatically interchangeable between them.

Project Web renderers Other platforms
OpenUI Lang React, Vue, Svelte, Angular React Native integration; community SwiftUI and Flutter renderers
json-render React, Vue, Svelte, SolidJS React Native; also lists output renderers for email, PDF, video, and terminal interfaces
A2UI React, Lit (web components), Angular Flutter for mobile, desktop, and web; native renderer availability and protocol-version support vary

These are useful precedents for contributors considering cross-platform rendering. They do not establish the Webclient’s framework choice or make a browser component tree portable by itself. A future client would still need a platform renderer that maps the shared component contract to that platform’s UI toolkit.