Primitive
Hello World
Auto-emitted from DSKintsugiCatalog.helloworld. Tier atom.
Live Preview
Rendered from HelloWorld DSL
Native · macOS
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
| Name | Type | Default | Description |
|---|
Used in
cross-target proof