UI & surfaces

UI is declared as components with state, methods, and a view tree. Product kind decides the surface.

kindSurfaceNotes
desktopNative windoweframe/egui
webBrowser via localhostHTML preview
mobileNative windowMobile-first layout
backendNoneServices only
Web = browser CLI prints “Opening web app in your browser…” and binds 127.0.0.1 (5173 / 3000 / 8080…). Press Ctrl+C to stop.

Component syntax

component HomePage {
  state title = "Home"
  state count = 0

  fn inc() {
    count = count + 1
  }

  view {
    Column {
      Text(title)
      Text(count)
      Button("Inc", onClick: inc)
    }
  }
}

UI only

vampcode run app/page.vamp
Web opens a desktop app? Ensure kind = "web" in vamp.toml, create with --type web, and update the CLI.