Skip to content

Documentation standard ​

Documentation ships with a public feature rather than following as optional cleanup. Every future public feature should include:

  • an API reference with types and defaults;
  • a minimal ordinary-use example and focused advanced examples, each an executable SFC under examples/ rendered live on the docs page (convention). On pages for components with a shipped theme recipe, the first preview and ordinary workflows are themed and headless composition sits in a signposted advanced section; see choose a guide's examples;
  • accessibility and keyboard guidance where relevant;
  • loading, empty, disabled, error, async, and edge-case behavior;
  • SSR, performance, or data-shape constraints when applicable; and
  • migration or deprecation notes for changed contracts.

Examples must represent supported APIs and should not invent features that do not exist. Keep canonical engineering guidance in docs/; link to it from AGENTS.md and tool integrations rather than copying it. Run pnpm docs:build to catch broken site configuration and invalid Markdown integration before review. The docs build also emits /llms.txt and /llms-full.txt for language-model clients. VitePress cleanUrls must stay paired with apps/docs/vercel.json ({"cleanUrls": true}) so extensionless page URLs do not 404 on Vercel.

Component page prose ​

Component pages explain behavior in prose and keep API names in the tables where readers look them up.

  • Keep each prose paragraph or list item to about four inline code spans. When a paragraph needs more, describe the behavior in words and leave the names to the API tables, or move the names into a table or a list with one name per item.
  • Before removing a prop, slot, or event name from prose, confirm the page's generated API table lists it. For a part or renderer without a table on the page, add a <!-- @generated docs-api:… --> block for its manifest rather than a hand-written table.
  • Exposed members, slot bindings, and error codes have no generated table. List them in a short table or a one-name-per-item list near the API section.
  • Keep a name in prose when the reader must type it to follow the paragraph, such as a prop value an example depends on.