Agent replay card — Product tour block
Proproduct-tour-agent-replay-card · for home, landing pages
Agent replay card
The heading centred above one conversation card: a landing section that shows what the assistant does, on its own
Documentation
Installation
One command copies the block into your project with the shadcn CLI (the registry is set once: Installation).
pnpm dlx shadcn-vue@latest add @trame/product-tour-agent-replay-cardUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import ProductTourAgentReplayCard from '@/components/trame/blocks/product-tour/product-tour-agent-replay-card.vue'
const props = {
title: "Delivery changes, sorted before the van leaves",
intro: "Haulwise’s assistant answers your customers by text, checks what tomorrow’s routes can take and updates the stop for the driver.",
agent: "Haulwise assistant",
channel: "Text message",
messages: [
{
from: "client",
text: "Hi, my sofa is due tomorrow but I won’t be home before 5 pm. Can the delivery move?"
},
{
from: "agent",
text: "Of course. Tomorrow’s evening run passes your street between 5 and 7 pm. Would that slot work?"
}
],
actions: [
"Stop moved to the 5–7 pm run",
"Two movers assigned"
],
caption: "Example conversation, written for this page."
}
</script>
<template>
<ProductTourAgentReplayCard v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title | string | Wordsthe section’s title, an h2 |
| intro | string | Wordsone or two sentences under the title |
| agent* | string | Wordsthe assistant’s name, as the merchant calls it ("Assistant of the workshop") |
| channel* | string | Wordswhere the conversation happens ("Messaging app", "Text message") |
| messages* | Message[] | the conversation replayed, in order |
| actions | string[] | Wordsone thing the assistant did, ticked at the end ("Appointment booked") |
| caption | string | Wordsan honest mention under the card; "Example conversation" when absent |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Message messages[] · 2 props
| Prop | Type | Description |
|---|---|---|
| from* | 'client' | 'agent' | who writes it: the customer, or the assistant |
| text* | string | Wordswhat is written, as the merchant scripted the example |
Options options · 2 props
| Prop | Type | Description |
|---|---|---|
| loop | boolean | replays the conversation again and again at the app’s expressive level, with a pause button |
| mood | 'inverse' | 'brand' | 'warm' | 'tint' | string | a band of the page that redefines the theme surfaces inside it |
What it asks your app for
The block never knows your app: it asks it, through one context provided once, where its links lead, what its actions do, how a price reads and which words to say (The host context).
| Member | What it is for |
|---|---|
| href | the address an action leads to, or null to hide what leads there |
| act | runs a change (subscribe, add to cart, save) and answers { ok } or { ok: false, error } |
| can | whether the page has this action |
| cartCount | the cart badge’s number |
| cartDrawer | whether your app has a cart drawer |
| cartOpen | whether the cart drawer is open |
| label | your word for an interface key, or undefined to keep the block’s own |
The words it says itself, in English and French; label(key) replaces any of them:
| Key | English | French |
|---|---|---|
| newsletter.already | You are already subscribed. | Vous êtes déjà inscrit. |
| newsletter.done | Done: you are subscribed. | C’est noté : vous êtes inscrit. |
| newsletter.invalid | Check the email address. | Vérifiez l’adresse e-mail. |
| newsletter.tooMany | Too many attempts, try again in a moment. | Trop de tentatives, réessayez dans un moment. |
Features
- Every word in the server HTML
- Same markup in Vue and React
- Theme tokens only: every theme, light and dark
- Shows what you give it, invents nothing
- Expressive motion, within its budget; still under reduced motion
- Real buttons and links, a visible focus
A product tour section, for home, landing pages; it uses @lucide/vue, class-variance-authority, clsx, motion, reka-ui, tailwind-merge.
Built with
The components this block is made of; each one installs on its own too.
More product tour blocks
- Before after: two screens or two states side by side, the old one quiet and the new one framed: a redesign or a change of routine — the merchant’s own only.
- Cards: the same product seen by 2 to 4 kinds of visitor, each with its own picture and the page it leads to — the merchant’s own only.
- Code change diff panel: An explanation beside static, escaped added and removed code lines; the merchant’s own only.
- Code sample install band: A focused command panel followed by capability chips; the merchant’s own only.
- Code sample terminal split: Documentation and actions beside a static code panel; the merchant’s own only.
- Code tabs cards picker: three or four named recipes: small cards in a row above one wide code panel, the chosen card outlined; the merchant’s own code only.
- Code tabs file tree: a small project of several files: a folder tree beside the open file, like an editor; the merchant’s own code only.
- Code tabs list and code: several distinct use cases, each with a line of explanation: the list at the left, the chosen one’s code at the right; the merchant’s own code only.