Button
Button elements are tappable calls-to-action. Each button carries an action — what happens when the visitor taps it. Six action kinds.
Six action kinds
| Action | What it does | When to use |
|---|---|---|
next_slide | Advance to the next slide in the deck order | Standard "Next" / "Continue" |
prev_slide | Go back to the previous slide | "Back" |
goto_slide | Jump to a specific slide by ID | Branching, "Skip to summary" |
open_link | Open an external URL (configurable target) | "Visit our website", "Schedule a call" |
submit_form | Submit a form on this slide (or anywhere in the deck) | Form steps where the agent shouldn't auto-submit |
agent_intent | Send a structured message to the agent so it can react in voice | "Tell me more", "Show pricing", "I'm ready" |
Inspector
The Button element inspector exposes:
| Name | Type | Description |
|---|---|---|
| label* | string | The visible button text. |
| variant | "primary" | "secondary" | "ghost" | Visual treatment. primary = filled accent, secondary = outline, ghost = no border. Default: primary. |
| action* | ButtonAction | Discriminated union — fields below depend on the kind. |
The action field changes shape based on which kind you pick:
Variants
The three visual variants pull from your deck theme:
primary— filled withtheme.colors.accent, white text.secondary— outline intheme.colors.accent, accent text. Best for non-primary CTAs.ghost— no border, no fill. Just text intheme.colors.text. Best for footer actions ("Maybe later").
Schema reference
Button element:
| Name | Type | Description |
|---|---|---|
| type* | "button" | Discriminator |
| label* | string | Visible text |
| variant | "primary" | "secondary" | "ghost" | Default: primary |
| action* | ButtonAction (discriminated by kind) | What happens on click |
ButtonAction discriminated union:
ts
type ButtonAction =
| { kind: "next_slide" }
| { kind: "prev_slide" }
| { kind: "goto_slide"; slideId: string }
| { kind: "open_link"; url: string; target?: "_self" | "_blank" }
| { kind: "submit_form"; formElementId: string }
| { kind: "agent_intent"; intent: string; data?: Record<string, unknown> };
Read next
- Embed — pair with
submit_formaction - Quiz — alternative for capturing structured visitor input
- Script and instructions — agent behavior on
agent_intent