Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.velt.dev/llms.txt

Use this file to discover all available pages before exploring further.

New to wireframes? Start with UI Customization Concepts and the Template Variables overview.

Overview

The Presence wireframe powers the user-avatar list showing who is currently active in the document. Variables below are available inside any <velt-presence-...-wireframe> tag via three forms:
You want to…UseExample
Display a value as text<velt-data field="var" /><velt-data field="componentConfig.user.name" />
Hide / show conditionallyvelt-if="{var}"velt-if="{componentConfig.filteredPresenceUsers.length} > 0"
Toggle a CSS classvelt-class="'cls': {var}"velt-class="'is-active': {componentConfig.isActive}"
This feature uses the flat-config access pattern — variables are referenced via the explicit componentConfig.<path> form.

Component Config

Root-level state shared with every Presence primitive.
VariableTypeDescriptionExample
componentConfig.filteredPresenceUsersPresenceUser[]Active users (after filters) — drives the avatar list.<velt-data field="componentConfig.filteredPresenceUsers.length" />
componentConfig.userUserCurrently identified end-user.<velt-data field="componentConfig.user.name" />
componentConfig.shadowDombooleanShadow-DOM rendering is enabled.Host config — set via element attribute.
componentConfig.variantstringPer-instance variant tag.<velt-data field="componentConfig.variant" />
componentConfig.maxUsersnumberMax avatars to show before collapsing into “+N” (default 5).<velt-data field="componentConfig.maxUsers" />
componentConfig.tooltipContentTemplateRef<any>Custom tooltip template (set programmatically via the [template] input — not used in wireframes).Internal — programmatic only.
componentConfig.trackByIdFunctionIdentity function used internally to track list items.Internal — used as a track-by function.
componentConfig.showTooltipFunctionHover-in handler. Wire to (mouseenter) on a custom avatar.Call this from your custom avatar markup.
componentConfig.closeTooltipFunctionHover-out handler.Call this from your custom avatar markup.
componentConfig.onPresenceUserClickFunctionClick handler for an avatar row.Call this from your custom avatar markup.

Context-Specific Variables

These are only resolvable inside the nested wireframe tags noted in the Available in column. Each is injected by the iteration / tooltip primitive that owns the tag.
VariableTypeAvailable inExample
componentConfig.userPresenceUser<velt-presence-tooltip-wireframe> and tooltip children<velt-data field="componentConfig.user.name" />
componentConfig.isActivebooleanTooltip context — true when the hovered user is currently active.velt-class="'is-active': {componentConfig.isActive}"
componentConfig.lastActiveAtnumberTooltip context — Unix timestamp when the user was last active.<velt-data field="componentConfig.lastActiveAt" />

Type Reference

Types referenced by the variables above are documented in Data Models:
TypeDescription
PresenceUserActive-user record (id, name, photoUrl, lastActive, etc.).
UserIdentified end-user object.

Subcomponents

Each subcomponent below has its own wireframe tag.

presence (root)

The root primitive — the <velt-presence> element customers place in their app.
  • Public element: <velt-presence>
  • Wireframe tag: <velt-presence-wireframe>
PropertyValue
Extra variablesNone — root only sees common variables.
<VeltPresenceWireframe>
  <VeltPresenceWireframe.AvatarList />
  <VeltPresenceWireframe.AvatarRemainingCount />
  <VeltPresenceWireframe.Tooltip />
</VeltPresenceWireframe>

presence-avatar-list

The list container that iterates filteredPresenceUsers and renders one avatar per active user.
  • Public element: <velt-presence-avatar-list>
  • Wireframe tag: <velt-presence-avatar-list-wireframe>
  • Children: presence-avatar-list-item<velt-presence-avatar-list-item-wireframe> (per-user avatar).
PropertyValue
Extra variablesNone at the list level. The per-iteration child receives the user from componentConfig.user.

presence-avatar-list-item

A single avatar in the list. Iterates over filteredPresenceUsers.
  • Public element: <velt-presence-avatar-list-item>
  • Wireframe tag: <velt-presence-avatar-list-item-wireframe>
PropertyValue
Extra variablesResolves the iteration’s componentConfig.user (PresenceUser).

presence-avatar-remaining-count

The “+N more” badge shown when there are more active users than componentConfig.maxUsers.
  • Public element: <velt-presence-avatar-remaining-count>
  • Wireframe tag: <velt-presence-avatar-remaining-count-wireframe>
PropertyValue
Extra variablesNone.
shouldShowcomponentConfig.filteredPresenceUsers.length > componentConfig.maxUsers

presence-tooltip

Hover tooltip that opens over an avatar.
  • Public element: <velt-presence-tooltip>
  • Wireframe tag: <velt-presence-tooltip-wireframe>
  • Children: presence-tooltip-avatar, presence-tooltip-status-container, presence-tooltip-user-name, presence-tooltip-user-active, presence-tooltip-user-inactive.
PropertyValue
Extra variablesPer-tooltip context — componentConfig.user, componentConfig.isActive, componentConfig.lastActiveAt.

Deeply-Nested Wireframe Tags

The tooltip decomposes further. Each tag below has its own <velt-presence-tooltip-...-wireframe> registration and inherits the tooltip’s per-user context.

Tooltip child tags

TagNotesExample
<velt-presence-tooltip-avatar-wireframe>The hovered user’s avatar.<velt-data field="componentConfig.user.photoUrl" />
<velt-presence-tooltip-status-container-wireframe>Wrapper for the active / inactive status row.(composes the two children below)
<velt-presence-tooltip-user-name-wireframe>The hovered user’s name.<velt-data field="componentConfig.user.name" />
<velt-presence-tooltip-user-active-wireframe>Renders when the user is currently active.velt-if="{componentConfig.isActive}"
<velt-presence-tooltip-user-inactive-wireframe>Renders when the user is not currently active. Show the relative lastActiveAt here.velt-if="!{componentConfig.isActive}"

Putting it together

A typical Presence list with custom avatars and a tooltip that swaps between active / inactive states:
<VeltPresenceWireframe>
  <VeltPresenceWireframe.AvatarList>
    <VeltPresenceWireframe.AvatarListItem>
      <img className="my-avatar" />
      <span><velt-data field="componentConfig.user.name" /></span>
    </VeltPresenceWireframe.AvatarListItem>
  </VeltPresenceWireframe.AvatarList>

  <VeltPresenceWireframe.AvatarRemainingCount
    velt-if="{componentConfig.filteredPresenceUsers.length} > {componentConfig.maxUsers}">
    +<velt-data field="componentConfig.filteredPresenceUsers.length" />
  </VeltPresenceWireframe.AvatarRemainingCount>

  <VeltPresenceWireframe.Tooltip>
    <div className="my-tooltip" velt-class="'is-active': {componentConfig.isActive}">
      <strong><velt-data field="componentConfig.user.name" /></strong>
      <VeltPresenceWireframe.Tooltip.UserActive
        velt-if="{componentConfig.isActive}">
        Active now
      </VeltPresenceWireframe.Tooltip.UserActive>
      <VeltPresenceWireframe.Tooltip.UserInactive
        velt-if="!{componentConfig.isActive}">
        Last seen <velt-data field="componentConfig.lastActiveAt" />
      </VeltPresenceWireframe.Tooltip.UserInactive>
    </div>
  </VeltPresenceWireframe.Tooltip>
</VeltPresenceWireframe>
  • Presence — wireframe overview and default markup for this primitive.
  • Template Variables — overview of the velt-data / velt-if / velt-class system.