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
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.
Build a card with one action
<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.
Slots, identity, and themes
| Surface | Behavior |
|---|---|
| Default slot | Main 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. |
theme | Space-separated variants: outlined, elevated, horizontal, cover-media, stretch-media, and divided-footer. |
Filter by responder and reveal surrounding content
<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-whenor useeitherfor the selected human or AI responder. Userepfor only a selected live human andstandinfor 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
hiddenon either the card itself or its closest dedicateddata-stand-revealancestor—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.
Behavior markers
- Put
data-stand-actionon 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-messageon at most one direct child. Stand reads itsvalue, editable content, or text when opening chat. - Put
data-stand-dismisson 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.
Opening and attribution attributes
| Attribute | Effect |
|---|---|
hidden | Recommended in the original HTML on either the card or its dedicated reveal wrapper to prevent a pre-upgrade flash. |
show-when | Optional display filter: either (the default), rep, or standin. Empty and unsupported values fail closed. |
greeting | Visible opening message from the responder for this activation. |
prompt | Private page context supplied to the new session. |
analytics-id | Placement label for activation reporting and comparison. |
visitor-id and visitor-name | Private page-known identity for only the session this card creates. A name without an ID is ignored. |
spotlight | Allows the card to become a centered modal-style invitation when its scroll condition is met. |
dismiss-label | Changes the generated spotlight dismissal label from its default, Cancel. |
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.
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.
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.
Example
This rendered example mirrors the page-native card demonstrated in the Tune Chat Behavior guide.

Riley
AI Stand-in