Primitive

Hello World

Auto-emitted from DSKintsugiCatalog.helloworld. Tier atom.

Live Preview
Rendered from HelloWorld DSL
Native · macOS
macOS SwiftUI render of Hello World
DSL usage
// HelloWorld — minimum cross-target proof (W4.5 spec)
// One body(context:) → ViewNode tree consumed by every renderer.

import KatagamiCore

public struct HelloWorld: ShikkiView {
    public init() {}

    public func body(context: RenderContext) -> ViewNode {
        ViewNode.vstack(
            children: [
                .text("Hello, World!", style: .heading),
                .text("Rendered identically on SwiftUI, Web, and TUI.", style: .body),
            ],
            spacing: .standard,
            alignment: .center
        )
    }
}

// All four targets produce IDENTICAL semantic trees:
//   swift run shi-storybook-web  → web/storybook-preview/atom/hello-world.html
//   swift run shi-storybook-tui  → ANSI stdout
//   swift run shi-storybook-app  → macOS SwiftUI window
//   ShiStorybookiOS.xcodeproj    → iPhone / iPad
Attributes
NameTypeDefaultDescription
Used in
cross-target proof