Developer integration
Stand card
The stand-card web component turns authored page content into a contextual chat invitation with explicit activation, optional visitor input, responder identity, presentation 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. |
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 initially; removed when Stand finds an available responder. |
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 hidden when no eligible live rep or AI Stand-in is available.
- 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.
- 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
The screen below shows the feature in its normal Stand context. Labels and surrounding controls may vary with account state and plan.
