Wireframe Variables — Documentation Template
This is the authoring guide for per-feature wireframe variable pages in the public docs. Every feature insdk/docs/wireframe-variables/ should eventually have a matching MDX page in ui-customization/features/.... Use this template verbatim — consistency across features is the point.
Scope reminder. “Wireframe variables” here means the dynamic template tokens (e.g.{user.name},{annotation.status}) that are read byvelt-data/velt-if/velt-classinside a<velt-wireframe>. They are not CSS variables. CSS variables are documented separately underui-customization/styling.mdxand feature-levelvariables.mdxpages.
1. When to use this template
- Trigger: a feature has a source reference at
sdk/docs/wireframe-variables/<feature>.mdbut no public-docs counterpart. - Output: one new MDX page per source file, placed inside the existing feature folder alongside the existing
wireframesandprimitivesfiles. - Title (in frontmatter): always
<Feature Name> Wireframe Variables, where<Feature Name>matches the feature’sgrouplabel indocs.json(e.g.Activity Logs,Comment Dialog,Notifications Panel).
Filename convention — match the siblings
Filenames in the docs repo are inconsistent across feature folders. Match the convention used by the siblingwireframes / primitives files in the same folder.
| Sibling files look like… | Use this filename |
|---|---|
wireframes.mdx, primitives.mdx (bare) | wireframe-variables.mdx |
<feature>-wireframes.mdx, <feature>-primitives.mdx (prefixed) | <feature>-wireframe-variables.mdx |
Source → docs map
| Public docs page (to author) | Source file |
|---|---|
ui-customization/.../activity-logs/activity-logs-wireframe-variables.mdx | sdk/docs/wireframe-variables/activity-log.md |
ui-customization/.../comment-dialog/wireframe-variables.mdx | sdk/docs/wireframe-variables/comment-dialog.md |
ui-customization/.../comment-sidebar/wireframe-variables.mdx | sdk/docs/wireframe-variables/sidebar.md |
ui-customization/.../notifications/panel/wireframe-variables.mdx | sdk/docs/wireframe-variables/notifications-panel.md |
…one per file in sdk/docs/wireframe-variables/ | (25 source files total) |
2. Mapped vs flat-config — pick one mode
The sourceREADME.md defines two access patterns. Pick the one that matches the feature and follow only that branch of the skeleton below.
| Pattern | Features | Variable form in tables |
|---|---|---|
| Mapped | Comment Dialog, Comments Sidebar, Comment Bubble, Inline Comments Section, Multi-Thread Comment Dialog, Text Comment, Notifications Panel, Notifications Tool, Activity Log | Bare names, e.g. user, annotation, darkMode |
| Flat-config | Cursor, Presence, Huddle, Recording, Transcription, View Analytics, Area, Arrow, Tag, Reactions, Selection, Rewriter, Comments Tool, Sidebar Button, Autocomplete | Explicit prefix, e.g. componentConfig.user, componentConfig.cursorUsers |
- Mapped features → keep the four state buckets (
App State/Data State/UI State/Feature State). Drop any bucket the source has nothing for. If the source MD has a separate “Per-instance Local UI State” bucket, fold it intoUI State— do not add a fifth bucket. - Flat-config features → replace the four buckets with a single
## Component Configsection, and keep the “flat-config”<Note>callout in the skeleton.
3. Page sections — required order
Every page follows this exact order. Sections in (optional) are included only when the source MD has the corresponding content.- Frontmatter
- Intro
<Note>linking to overview + template variables ## Overview(3-form usage table + mapped/flat-config note)## App State/## Data State/## UI State/## Feature State(mapped) or## Component Config(flat-config)## Common Props(optional — include only if the feature documents shared attributes / signal inputs)## Context-Specific Variables(optional — only when the source has it; include the alias<Note>directly under the table when the source mentions aliases)## Type Reference(optional — slim summary table linking out todata-models; include when the page references 2+ compound types)## Subcomponents(optional — one### <subcomponent>per item that has at least one of: extra variables, ashouldShowcondition, a host class, or a meaningful example)## Deeply-Nested Wireframe Tags(optional — flattens the long tail of leaf tags the source documents at the bottom)## Putting it together(always — exactly one realistic combined example, in<Tabs>)## Related(always — links to siblings + template-variables overview)
4. Page skeleton (copy-paste scaffold)
Replace every<Feature Name>, every example variable, and the <!-- comments --> with real content from the source file. Delete sections that don’t apply.
5. Authoring rules
A. Frontmatter
| Field | Rule |
|---|---|
title | Exactly <Feature Name> Wireframe Variables. <Feature Name> matches the group label in docs.json. |
description | One sentence. Must mention velt-data, velt-if, velt-class so the page indexes well for in-site search. |
B. Variable tables — table-shape depends on context
There are two table shapes used on the page. Match the right one to the context: Top-level state buckets (App State / Data State / UI State / Feature State / Component Config) and Context-Specific Variables — 4 columns:| Variable | Type | Description | Example |
|---|
Available in instead of Description.)
Subcomponent extra-variable tables — 3 columns (no Description):
| Variable | Type | Example |
|---|
record.user, record.user.userId) where the example tells you everything you need.
C. Column rules (apply to both table shapes)
| Column | Rule |
|---|---|
| Variable | Backticks around the name. Mapped features use bare names (user). Flat-config features use the full path (componentConfig.user). Nested-access rows in subcomponent tables use dot paths (record.user.userId). |
| Type | Backticks. If compound (User, CommentAnnotation, Comment, Notification, ActivityRecord, etc.), make the type name a markdown link to /api-reference/sdk/models/data-models#<lowercased-type-name>. Union types: write outside the backticks and escape with | if inside a table cell, e.g. [`Comment`](...) | `null`. Array types: append [] outside the backticks, e.g. [`User`](...)`[]`. |
| Description (only on 4-col) | One sentence. Start with the noun or verb — no leading “The …” / “A …”. Use the source’s “Notes” column when present; otherwise summarize the source’s sample-value comment. |
| Example | One usage form, chosen by type: • booleans → velt-if / velt-class• primitives & nested-access roots → velt-data• arrays → velt-data with indexUse the HTML self-closing form ( <velt-data field="…" />) inline. The React/Other Frameworks tabs are reserved for the <Tabs> blocks. |
D. Subcomponent Property/Value tables
For each subcomponent, put metadata in a 2-column Property | Value table. Standard properties (omit any row that doesn’t apply):| Property row | Use when | Example value |
|---|---|---|
Extra variables | Always include this row. | None — root only sees common variables. or None. or None beyond common variables. |
shouldShow | Source documents a shouldShow condition for the subcomponent. | `isEnabled === true && isOpen === true` |
Host class | Source documents a CSS class always applied to the host element. | `velt-activity-log--container` (always present) |
E. Type Reference section
Keep it slim. Do NOT inline full type field tables — that duplicates content fromdata-models.mdx. The section is just a quick lookup table:
F. Sample values — use Accordion sparingly
The source MD files include large JSON sample values per variable. Do not paste these into the variable tables. If a sample is genuinely useful (typically only for compound objects whose shape isn’t obvious from the linked data-models page), put it in a collapsible<Accordion> immediately after the relevant table:
G. Code examples — drop wrapper elements
Top-level rule: prefer attachingvelt-if / velt-class directly to a real element rather than wrapping it in a structural container.
Don’t use these wrappers in either tab:
velt-if directly on the element it controls:
<div>, <span>, <section>) with velt-if as an attribute.
H. “Putting it together” example
- Always exactly one realistic wireframe combining 2–4 variables — enough to show real-world usage, not a kitchen sink.
- Always wrapped in
<Tabs>with two tabs titled exactly"React / Next.js"and"Other Frameworks"(matches sibling pages). - React tab uses the dot-notation wireframe component (e.g.
<VeltCommentDialogWireframe.ResolveButton>) wrapping HTML that still usesvelt-if/velt-dataattributes — the tokens themselves are framework-agnostic. - Other Frameworks tab uses the kebab-case web component (e.g.
<velt-comment-dialog-resolve-button-wireframe>). - Position: place this section after Subcomponents and Deeply-Nested Wireframe Tags, before Related. It’s the closing example.
I. Related links
End every page with a## Related section linking to:
- The sibling wireframes page — relative path matching the actual filename in this folder (
./wireframesor./<feature>-wireframes). - The sibling primitives page — relative path matching the actual filename (
./primitivesor./<feature>-primitives). /ui-customization/template-variables(absolute path).
J. Navigation registration (docs.json)
After authoring the page, register it in navigation:
- Open
docs.json. - Find the
groupmatching the feature name (e.g."group": "Activity Logs") under the UI Customization navigation tab. - Add the new page path to its
pagesarray, between the existingwireframesandprimitivesentries:
docs.json (Async Collaboration features, REST API, UI Customization). Make sure you edit the UI Customization entry, not the others.
K. Forbidden terminology — never use these words
The public docs are framework-neutral. The source MD files come from an Angular-heavy SDK codebase and use vocabulary that leaks framework details — strip it. Do not use any of these words anywhere on the page:| Don’t write | Why | Use instead |
|---|---|---|
Angular | Framework-specific name. | ”parent-child component composition”, or omit the framework reference entirely. |
<ng-container> | Angular structural-directive container. | Drop the wrapper; put velt-if directly on the conditional element (see §G). |
slot / sub-slot | Conflates with Web Components <slot> semantics; not what we mean here. | ”tag” (for the markup-level meaning of <velt-...-wireframe>) or “sub-component” (for the conceptual subdivision). Use “values” if “slot” was being used in the sense of “field/property”. |
6. Anti-patterns — explicitly do NOT do these
- ❌ Do not rename the four state buckets, even if the source mixes them. Keep
App State,Data State,UI State,Feature Stateexactly as-is. Fold any “Per-instance Local UI State” rows intoUI State— do not add a fifth bucket. - ❌ Do not inline full type field tables in the Type Reference section. Link out to
data-models.mdx; only summarize. - ❌ Do not restate template-variable mechanics (operators, path resolution,
safeEval, nested-access rules). Link totemplate-variables.mdxinstead — DRY. - ❌ Do not add a CSS variables section. That’s covered by
styling.mdxand feature-levelvariables.mdx(CSS-only) pages. - ❌ Do not paste large JSON sample values directly into variable tables. Use an
<Accordion>only when the shape isn’t obvious from the linked type. - ❌ Do not invent variable names. If a name isn’t in the source MD file, it’s not supported — leave it out.
- ❌ Do not use forbidden terminology (§K): no
Angular, no<ng-container>, noslot/sub-slot. - ❌ Do not wrap a single
<velt-data>in a<velt-if>or other structural container. Putvelt-ifdirectly on the element (§G).
7. Authoring checklist
Before merging a new wireframe-variables page, confirm:- Filename matches the sibling-files convention in the same folder (bare vs prefixed).
- Frontmatter
titlematches the feature’sgrouplabel indocs.json. - Mapped vs flat-config decision matches the table in §2.
- Top-level state buckets use the 4-col table (
Variable | Type | Description | Example). - Subcomponent extra-variable tables use the 3-col table (
Variable | Type | Example). - Subcomponent metadata uses the 2-col Property/Value table with the standard rows.
- All compound types in the Type column link to the correct
data-modelsanchor. - Type Reference section (if present) links out and does not inline field tables.
- Each row’s Example uses the right form for its type (
velt-data/velt-if/velt-class). - Code examples never use
<ng-container>or<velt-if>as a single-element wrapper. - No forbidden terminology: search the page for
angular,ng-container,slot(case-insensitive) — must return zero hits in prose, headings, and code. - Exactly one
## Putting it togetherblock exists, wrapped in<Tabs>with both framework variants, positioned after Subcomponents and Deeply-Nested Wireframe Tags. -
## Relatedlinks resolve (relative paths match the sibling filenames; absolute/ui-customization/template-variables). - No
## Component Configsection coexists with the four state buckets — pick one. - No CSS variables on this page.
-
docs.jsonupdated under the UI Customization group (not API Reference or Async Collaboration), between the feature’swireframesandprimitivesentries.

