Skip to main content
Template variables are {…} tokens that read live Velt data inside a wireframe. Use them to display dynamic values, or as the condition for a conditional template or conditional class. Velt exposes its own data, and you can inject your own. Every available name is in the catalog at the end of this page.

Display a variable

Object variables support nested paths like {annotation.from.name}; scalars don’t. If a deep path comes back empty, check the variable’s type in the catalog. Example: a custom user card

The main data objects

A few variables are whole objects. The catalog tells you which are available where; these links give you every field each one carries: Counts are plain numbers: unreadCommentAnnotationCount and unreadCommentCount anywhere, plus filteredCommentAnnotationsCount in the comments sidebar.
context resolves two different ways. field="context.someProperty" reads the parent component’s local UI state (e.g. the Inline Comments Section’s own context). To read context stored on the annotation, use field="annotation.context.someProperty". See Context.

Inject your own data

Push your app’s data into Velt with setUiState(), then read it in any wireframe, condition, or class.
Read it back with the uiState. prefix, exactly like a built-in variable:
setUiState is app-global. To attach data to one comment, use Context instead.

Which name form to use

Components read variables in one of two ways:
  • Short aliases like {annotation.from.name}: Comment Dialog, Comments Sidebar, Comment Bubble, Inline Comments Section, Multi-Thread Comment Dialog, Text Comment, Notifications Panel, Notifications Tool, Activity Log. (These accept the explicit form below too.)
  • Explicit {componentConfig.<name>}: Cursor, Presence, Huddle, Recording, Transcription, View Analytics, Area, Arrow, Tag, Reactions, Selection, Rewriter, Comments Tool, Sidebar Button, Autocomplete.
If a short alias resolves to undefined, fall back to {componentConfig.<name>}.

Troubleshooting

A variable rendering blank or undefined is almost always one of these:
  1. Spelling. Names are case-sensitive; copy them from the catalog.
  2. Scope. You’re in a slot that doesn’t receive it ({comment} and {commentIndex} exist only inside thread-card descendants; {notification} only in the notifications panel).
  3. Name form. Flat-config components need {componentConfig.<name>} (see above).
  4. Nesting. The root isn’t an object, so the deep path has nothing to resolve.

Variable catalog (per component)

Every {…} variable you can read inside a wireframe, with an example for each.
  • Buckets: app (per-user) Β· data (per-annotation) Β· ui (per-instance) Β· feature (SDK-config flags) Β· iteration (loop-scoped).
  • πŸ”‘ marks the boolean state flags you’ll reach for most in velt-if / velt-class.
  • Iteration variables appear inside list slots: {i} (alias commentIndex, 0-based), the per-item object (option, filter, emoji, activity, dateGroup, chip, view, file, …), and per-item booleans (isSelected, isActive, isExpanded, isAscending).
  • Function-typed variables (onClick…, initRecording, toggleSidebar, handleEmojiSelected, …) are call-handlers you bind to events, not values to display.
  • Examples work in both React and Other Frameworks; only the spelling differs (veltIf prop vs velt-if attribute, <VeltData/> vs <velt-data>).
  • Need a deep field that isn’t listed? console.log the object from a hook (e.g. useCommentAnnotations()) to see its exact shape.

Comment Dialog

Comment Bubble

Access model: structured; some need full globalConfigSignal.* / parentLocalUIState.*.

Comment Pin

Text Comment

Access model: flat-config: {componentConfig.<x>}.

Inline Comments Section

Access model: structured.

Multi-Thread Comment Dialog

Access model: structured, per-instance.

Autocomplete (@mentions)

Access model: flat-config.

Comments Sidebar

Access model: flat-config: {componentConfig.<x>}.

Notifications Panel & Tool

Access model: structured; short names.

Reactions

Access model: flat-config.

Presence

Access model: flat-config.

Cursor

Access model: flat-config.

Huddle

Access model: flat-config.

Recorder

Access model: flat-config: use full componentConfigSignal. for collisions.

Transcription

Access model: flat-config.

Activity Log

Access model: structured.

View Analytics

Access model: flat-config.

Comments Tool

Access model: structured; componentConfig.data.* / .uiState.*. Access model: structured.

Area Β· Arrow Β· Selection Β· Rewriter

Access model: flat-config.

Tags

No wireframe variables / slots. Customize via the [template] input on velt-tag-pin / velt-tag-dialog, CSS, or the headless useTagAnnotations / useTagUtils hooks. See Annotations, tags, arrows, and areas.