view is an AUP cross-device primitive, not a Web Device layout component and not a Web-only widget. It is one of the 18 names in AUP_PRIMITIVES and appears in every target's DeviceCaps.primitives map as native, webview, partial, or unsupported.
Contract
| Field | Value |
|---|---|
| Primitive name | view |
| Layer | AUP cross-device primitive (AUP_PRIMITIVES) |
| Public status | released |
| Document capability | native |
| Shared degradation chain | None (document reports native) |
| Author entry | AUP tree · DSL · Markdown container directives (::::view, steps) |
| Document renderer / notes | renderer/primitives/view.ts (tabs / steps / card modes) |
| Showcase evidence | Composition across Showcase pages; tabs path verified on document |
When to use
Need a semantic container, panel grouping, mode=tabs, or mode=steps that other devices can interpret.
When not to use
Do not use view as a Web Device layout.aup section stand-in for portal-header, content-card, or other site components.
Sample contract
| Field | Value |
|---|---|
| Purpose | Static tabs chrome on the document target |
| Boundaries | No session patch, no exec, no layout-component API |
| Author entry | Generic container directive ::::view |
| Surface | Web Device document |
| Public status | released on document |
| Fallback / failure | Missing label omits accessible tablist name; wrong fence depth drops panels |
| Verification | Routes below · arc --version = 2.0.0-beta.28 |
Document sample (tabs)
This is an unbound document-target view with mode="tabs". Switching tabs only changes which panel is visible in the browser. It does not open an AUP session or write content.
Source:
::::view{id="docs-prim-view-tabs" mode="tabs" label="Package manager"}
:::view{label="pnpm"}
Install with `pnpm install`.
:::
:::view{label="npm"}
Install with `npm install`.
:::
::::Rendered:
Install with pnpm install.
Install with npm install.
The outer fence needs more colons than nested containers. Same contract as Live examples: scope and contract.
Failure and limits
| Situation | Expected result |
|---|---|
Leaf ::view with no body | Empty panel / no body content |
| Outer fence with too few colons | Parser misreads structure; panels may drop |
No label on the tabs container | Tabs still render; accessible name on the tablist is omitted |
Treating tabs as layout .web components | Wrong surface — layout components use layout.aup, not this directive |
Document sample (steps mode via view)
mode="steps" is also available on a generic view container. The Markdown-native tutorial path is ::::steps / :::step (see steps); both land on document view rendering.
Source:
::::view{id="docs-prim-view-steps" mode="steps" label="Two checks"}
:::view{title="Check the surface"}
Confirm you are on the document target, not a layout section.
:::
:::view{title="Check the fence depth"}
Outer containers need more colons than nested ones.
:::
::::Rendered:
Check the surface
Confirm you are on the document target, not a layout section.
Check the fence depth
Outer containers need more colons than nested ones.
Verification evidence
| Item | Value |
|---|---|
| Baseline | 2026-08-09 · arc --version → 2.0.0-beta.28 |
| Capability row | docs/aup/capability-matrix.md (internal, non-routed) · view |
| Implementation | providers/runtime/web-device/src/content-reader.ts (generic container); renderer/primitives/view.ts (tabs / steps) |
| Public routes | /en/docs/aup/primitives/view/ · /zh/docs/aup/primitives/view/ |
| Local run | arc service start --blocklet blocklets/arcblock --port 4900 then open those routes (desktop + ~390px) |
| Accept | Source fence matches rendered tabs/steps; tab switch does not network-write; fence errors do not crash the page |
Evidence anchors
| Item | Value |
|---|---|
| Registry | packages/aup/src/aup-types.ts · AUP_PRIMITIVES |
| Document caps | providers/runtime/web-device/src/device-caps.ts · DEVICE_CAPS_DOCUMENT |
| Degradation | packages/aup/src/degradation.ts · DEGRADATION_CHAINS |
| Internal matrix | docs/aup/capability-matrix.md (internal, non-routed) |
| Taxonomy hub | Primitive taxonomy and evidence |
| Sample contract rules | Live examples: scope and contract |