Skip to content

abra-code/ActionUI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

704 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ActionUI

Build native interfaces from JSON, across Apple, Android, and the Web — designed for AI-assisted development and rapid prototyping

ActionUI renders dynamic UIs from JSON descriptions. One JSON document drives three native renderers from a shared schema: SwiftUI on Apple platforms, Jetpack Compose on Android, and DOM/CSS in the browser. It replaces Interface Builder, Storyboards, or hand-coded UI with a simple, declarative format that's both human-readable and AI-friendly.

Try the live browser demo → (no install, no local server)

Quick Example

{
  "type": "Form",
  "properties": {
    "children": [
      {
        "type": "TextField",
        "id": 1,
        "properties": { "title": "Name", "prompt": "Enter your name", "actionID": "nameChanged" }
      },
      {
        "type": "Picker",
        "id": 2,
        "properties": { "title": "Theme", "items": ["Light", "Dark", "Auto"], "actionID": "themeChanged" }
      },
      {
        "type": "Button",
        "id": 3,
        "properties": { "title": "Save", "buttonStyle": "borderedProminent", "actionID": "save" }
      }
    ]
  }
}

This produces a fully native form — a SwiftUI form on Apple, a Compose form on Android, a DOM form on the Web — from the same JSON, with no per-platform UI code and no storyboards.

Key Features

  • Three native renderers, one JSON — SwiftUI (Apple), Jetpack Compose (Android), DOM/CSS (Web), at feature parity across ~57 components — layouts, inputs, tables, maps, video, canvas, and more
  • Runtime flexibility — load UIs from JSON files or network without recompilation
  • Add-on architecture — third-party element types (Chat, Diff, RichText, QuickLook, CachedImage) plug into the engine without living in core
  • Python bridge — build complete macOS apps in Python with import actionui
  • Multi-window, menu bar, dialogs — native app features out of the box
  • AI-first design — predictable JSON schema that LLMs generate reliably - for agent skill information see Skill/README.md
  • Apple platforms — macOS, iOS, iPadOS, watchOS, tvOS, visionOS
  • Multiple language adapters — Swift, Objective-C, C, C++, Python, JavaScript

Example Apps using ActionUI

Python Example

import actionui

app = actionui.Application(name="MyApp")
window = actionui.Window.from_file("ui.json", title="My App")
app.load_and_present_window(window)

@app.action("save")
def on_save(ctx):
    name = window.get_string(view_id=1)
    print(f"Saving: {name}")

app.run()

Documentation

Design Philosophy

AI-First — Every API decision considers "can an LLM use this reliably?"

Fail Gracefully — Invalid JSON doesn't crash. Properties are validated, missing values get defaults, and the UI degrades gracefully.

Platform Native — ActionUI doesn't abstract platforms away — it embraces each one. The generated views are real SwiftUI views on Apple, real Compose composables on Android, and real DOM on the Web, with each platform's full performance and capabilities.

Minimal Complexity — JSON defines the UI, your code handles the logic. No state management framework, no build toolchain, no widget hierarchy to manage.

Platform Support

Platform Minimum Version
macOS 14.6+
iOS 17.6+
iPadOS 17.6+
watchOS 10.6+
tvOS 17.6+
visionOS 2.6+
Android 12.0+
Web Any modern browser (ES modules, no build step)

License

ActionUI is licensed under the PolyForm Small Business License 1.0.0 — free for personal projects, open source, education, internal tools, and qualifying small businesses (fewer than 100 people and under ~$1.3M adjusted revenue). Larger commercial use requires a paid license — contact me for details.

Contribution-ware

To encourage adoption, a free license will be granted to companies not meeting the small business criteria but making a significant contribution to the project. The contribution classification:

  • trivial (bug fix, minor docs),
  • non-trivial (new view/modifier, tests, examples),
  • significant (major feature, architecture, language adapter, 10+ non-trivial contributions).

Contributing

By contributing you agree that your contribution may be included in commercial license without compensation or royalties. If you cannot accept these terms, do not contribute.

About

Build SwiftUI, Android and Web interfaces from JSON description

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages