Tokamak

screenshot of Tokamak

SwiftUI-compatible framework for building browser apps with WebAssembly and native apps for other platforms

Overview

Tokamak is a SwiftUI-compatible framework for building browser apps with WebAssembly. It aims to implement as much of the SwiftUI API as possible and provides additional features to simplify HTML and CSS interactions. The framework is compatible with both Apple platforms and platforms supported by Tokamak, such as WebAssembly/WASI.

Features

  • SwiftUI Subset: Tokamak currently supports a basic subset of SwiftUI, including a DOM renderer with support for certain view types and modifiers.
  • HTML View: Tokamak allows for the construction of arbitrary HTML using the HTML view. This is useful for static rendering in libraries like TokamakVapor and TokamakPublish.
  • DynamicHTML View: The DynamicHTML view provided by the TokamakDOM module allows for handling DOM events like onclick and onmouseover by passing closures in the listeners dictionary.
  • Arbitrary Styles and Scripts: Tokamak allows for injecting arbitrary scripts or styles through direct DOM access, enabling the use of custom styles or third-party libraries.
  • Fiber Renderers: Tokamak optionally provides a reconciler modeled after React's Fiber reconciler. This can offer faster updates and allow for larger view hierarchies. It also includes layout steps that closely match SwiftUI layouts.
  • Compatible Platforms: Tokamak is compatible with Apple platforms as well as platforms supported by WebAssembly/WASI.

Summary

Tokamak is a SwiftUI-compatible framework for building browser apps with WebAssembly. It aims to provide a subset of the SwiftUI API and simplify HTML and CSS interactions. With features like the HTML and DynamicHTML views, arbitrary styles and scripts, and a Fiber reconciler, Tokamak offers developers a powerful tool for creating browser apps.

ui-kit
UI Kits & Components

A UI kit provides developers with a set of reusable components that can be easily integrated into a website or application. These components are pre-designed with consistent styling and functionality, allowing developers to save time and effort in the design and development process. UI kits can be either custom-built or third-party, and often include components for buttons, forms, typography, icons, and more.