Feature referenceDeveloper integration · 05 of 05

Developer integration

Stand card

The stand-card web component turns authored page content into a contextual chat invitation with explicit activation, responder display filtering, dedicated surrounding-content reveal, optional visitor input, identity, themes, and spotlight behavior.

Availability
All plans
Configured in
Website HTML → <stand-card> after the Stand embed script
Category
Developer integration
Reference status
Current
01

What a Stand card does

<stand-card> is a page-native container for a richer chat invitation. The website authors its body, media, controls, and supporting text; Stand adds responder availability, optional identity, activation behavior, and a consistent card shell.

A card is inert until the author marks either the whole card or one direct child with data-stand-action. This explicit contract prevents ordinary links, buttons, or form controls inside the card from unexpectedly opening chat.

02

Build a card with one action

Pricing help card
<stand-card
  hidden
  identity="avatar name title"
  greeting="I can help compare plans. What matters most?"
  prompt="Ask about team size and expected chat volume before recommending a plan."
  analytics-id="pricing-help"
  theme="outlined divided-footer"
>
  <strong>Not sure which plan fits?</strong>
  <span>Describe what your team needs.</span>
  <textarea data-stand-visitor-message rows="3"></textarea>
  <button slot="actions" type="button" data-stand-action>Start chat</button>
  <span slot="footer">A person or AI Stand-in will answer.</span>
</stand-card>

The textarea value becomes the first visitor message; the prompt remains private responder context.

03

Slots, identity, and themes

SurfaceBehavior
Default slotMain card copy and controls.
slot="media"Image, video, or other lead media.
slot="actions"Dedicated row for activation or dismissal controls.
slot="footer"Supplementary copy, badges, or controls; divided-footer adds a divider.
identity="avatar name title"Selects responder identity fields. When identity is shown for an AI Stand-in, the AI badge is also included.
themeSpace-separated variants: outlined, elevated, horizontal, cover-media, stretch-media, and divided-footer.
04

Filter by responder and reveal surrounding content

Separate human and AI page invitations
<section hidden data-stand-reveal>
  <h2>A person is available</h2>
  <stand-card show-when="rep" greeting="How can I help?" data-stand-action>
    Talk with our team
  </stand-card>
</section>

<section hidden data-stand-reveal>
  <h2>Get an immediate AI answer</h2>
  <stand-card show-when="standin" greeting="What would you like help with?" data-stand-action>
    Ask our AI Stand-in
  </stand-card>
</section>

Separate wrappers keep responder-specific surrounding copy paired with the matching card.

  • Omit show-when or use either for the selected human or AI responder. Use rep for only a selected live human and standin for only a selected AI Stand-in. Empty and unsupported values fail closed.
  • The filter reads the single responder selected by find or session restoration. It does not change routing, request a responder type, report that both types are available, or guarantee a later assignment.
  • Put native hidden on either the card itself or its closest dedicated data-stand-reveal ancestor—not both. The self-hidden card takes precedence and Stand removes exactly one attribute.
  • Stand never climbs to an arbitrary hidden ancestor and does not change aria-hidden, inert, dialogs, tabs, accordions, or application state.
05

Behavior markers

  • Put data-stand-action on the card itself for whole-card activation, or on exactly one direct child for a dedicated action—not both.
  • A whole-card action receives button semantics and Enter/Space keyboard activation. Nested interactive elements do not accidentally activate the card.
  • Put data-stand-visitor-message on at most one direct child. Stand reads its value, editable content, or text when opening chat.
  • Put data-stand-dismiss on at most one direct child to author a custom spotlight dismissal control.
  • The activation and dismissal markers must identify different elements. Contract conflicts log a warning and disable the conflicting behavior.
06

Opening and attribution attributes

AttributeEffect
hiddenRecommended in the original HTML on either the card or its dedicated reveal wrapper to prevent a pre-upgrade flash.
show-whenOptional display filter: either (the default), rep, or standin. Empty and unsupported values fail closed.
greetingVisible opening message from the responder for this activation.
promptPrivate page context supplied to the new session.
analytics-idPlacement label for activation reporting and comparison.
visitor-id and visitor-namePrivate page-known identity for only the session this card creates. A name without an ID is ignored.
spotlightAllows the card to become a centered modal-style invitation when its scroll condition is met.
dismiss-labelChanges the generated spotlight dismissal label from its default, Cancel.
07

Spotlight presentation

  • A fully visible spotlight card activates when it crosses the viewport midpoint while scrolling in either direction.
  • The centered card sits above a blurred backdrop while an imprint preserves the original page layout.
  • Escape, a backdrop click, an authored dismissal, or the generated Cancel action closes it. Activating chat also resolves it.
  • Dismissal or activation is remembered per card and page in the visitor’s browser origin, preventing the same spotlight from repeatedly interrupting that browser.
  • The card repositions for viewport and on-screen-keyboard changes and holds actions steady during an active pointer gesture.
08

Availability and opening sequence

  • Like Stand button, the card retries until the public API exists and subscribes to whenAvailable(...).
  • It remains gated when no eligible responder is available or the selected responder does not match show-when.
  • Multiple cards and buttons evaluate availability independently. A shared marked wrapper is revealed when any child matches, while each mismatched component stays internally hidden.
  • Activation opens Stand with source stand_card, the click or keyboard interaction, greeting, private prompt, optional visitor message, optional identity, and analytics ID.
  • The card’s displayed identity comes from the responder availability returned for the current page.
09

Boundaries and accessibility

  • Use type="button" on authored button actions so they cannot submit an ancestor form before the custom element upgrades or when the script is unavailable.
  • The card does not become interactive without a valid action marker and cannot bypass normal Stand routing.
  • External reveal is one-way. Use a dedicated wrapper that the application does not control or reconcile, and use separate wrappers for responder-specific surrounding copy.
  • Do not mark a hidden tab, modal, accordion, responsive duplicate, or other application-state container as the reveal target.
  • Literal HTML attributes are inspectable in page source; do not place credentials or secrets in prompts or identity fields.
  • Use Stand button for a compact label-only invitation and the JavaScript API for an existing application control.
10

Example

This rendered example mirrors the page-native card demonstrated in the Tune Chat Behavior guide.

Riley

AI Stand-in

AI
Not sure which plan fits?Describe what your team needs.
A person or AI Stand-in will answer.
A host-page Stand card with responder identity, visitor input, one explicit chat action, and a divided footer.