Product demo beside — Product tour block
Proproduct-tour-product-demo-beside · for home, landing, product pages
Product demo beside
The product’s live mini-interface on a picture beside an accordion of its sub-features, opening one plays its pointer’s short demo: one feature told through 2 to 5 sub-features, the visitor choosing what to see; figures, names and messages in the mini-interfaces are the merchant’s own only.
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-product-demo-besideUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import ProductTourProductDemoBeside from '@/components/trame/blocks/product-tour/product-tour-product-demo-beside.vue'
const props = {
badge: "Scheduling",
title: "Plan the week in minutes, and let the jobs run themselves",
lead: "Crews, customers and invoices in one place, for home-service teams of two to fifty. Open a feature to watch it work.",
illustration: "data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20320%20220%22%20fill%3D%22none%22%20stroke%3D%22hsl(220%208%25%2052%25)%22%20stroke-width%3D%222.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%22168%22%20cy%3D%22112%22%20r%3D%2292%22%20fill%3D%22hsl(220%208%25%2052%25%20%2F%20.09)%22%20stroke%3D%22none%22%2F%3E%3Cg%20transform%3D%22rotate(-8%20120%20110)%22%3E%3Crect%20x%3D%2262%22%20y%3D%2244%22%20width%3D%22132%22%20height%3D%22122%22%20rx%3D%2214%22%2F%3E%3Cpath%20d%3D%22M62%2076h132M92%2034v20M164%2034v20%22%2F%3E%3Cpath%20d%3D%22M80%2096h22M114%2096h22M148%2096h22M80%20120h22M114%20120h22M80%20144h22%22%2F%3E%3Crect%20x%3D%22146%22%20y%3D%22114%22%20width%3D%2228%22%20height%3D%2214%22%20rx%3D%224%22%20fill%3D%22hsl(220%208%25%2052%25%20%2F%20.25)%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22rotate(10%20252%2070)%22%3E%3Ccircle%20cx%3D%22252%22%20cy%3D%2270%22%20r%3D%2232%22%2F%3E%3Cpath%20d%3D%22M252%2052v18l12%208%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22rotate(6%20236%20160)%22%3E%3Crect%20x%3D%22196%22%20y%3D%22132%22%20width%3D%2298%22%20height%3D%2256%22%20rx%3D%2210%22%20fill%3D%22hsl(220%208%25%2052%25%20%2F%20.12)%22%2F%3E%3Cpath%20d%3D%22M212%20160l10%2010%2020-22M256%20152h24M256%20168h16%22%2F%3E%3C%2Fg%3E%3Cpath%20d%3D%22M40%20182c18-6%2030-2%2044%206M286%2030l6-10M298%2040l10-4M24%2070l-10-4%22%2F%3E%3C%2Fsvg%3E",
picture: "https://images.unsplash.com/photo-1721932423849-e9033192b190?w=1600&q=80",
items: [
{
title: "Drag-and-drop schedule",
text: "Move a job to another day and the crew, the customer and the route follow. A full week takes minutes, not an afternoon.",
link: {
label: "Discover scheduling",
action: "scheduling"
},
visual: {
kind: "board",
title: "Week of March 10",
columns: [
{
label: "Mon 10",
cards: [
{},
{}
]
},
{
label: "Tue 11",
cards: [
{},
{}
]
}
],
floats: [
{
kind: "notice",
title: "Omar moved to Tuesday",
text: "Customer notified by text",
tone: "success"
}
],
script: [
{
act: "drag",
target: "card-3",
from: "column-2",
reveals: "float-0"
}
]
}
},
{
title: "Reminders that send themselves",
text: "Choose which messages go out before and after each job. Customers stop forgetting, and crews stop knocking on closed doors.",
link: {
label: "See the reminders",
action: "reminders"
},
visual: {
kind: "toggles",
title: "Customer messages",
rows: [
{
label: "Day-before reminder",
meta: "Text at 6 pm, with the arrival window",
on: true
},
{
label: "On-the-way message",
meta: "When the crew leaves the previous job",
on: true
}
],
floats: [
{
kind: "notice",
title: "On for 42 upcoming jobs",
tone: "info"
}
],
script: [
{
act: "toggle",
target: "switch-1",
reveals: "float-0"
}
]
}
}
]
}
</script>
<template>
<ProductTourProductDemoBeside v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| badge | string | Wordsa short label above the title ("Scheduling") |
| title* | string | Wordsthe section’s title, an h2 |
| lead | string | Wordsone or two sentences under the title |
| illustration | string | Picturea line illustration beside the title, decoration only: a transparent drawing that reads on light and dark |
| picture | string | Picturea photograph the mini-interfaces are laid over (where the service happens); without it, a coloured panel |
| items* | Item[] | 1 to 6 sub-features, each with its mini-interface; the first one is open |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Item items[] · 4 props
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe sub-feature, in a few words: the accordion’s heading, an h3 ("Drag-and-drop schedule") |
| text* | string | Wordsone or two sentences on what it does for the visitor |
| link | Link | the link: its words and the page action it runs |
| visual* | Visual | Visual | Visual | Visual | Visual | Visual | its mini-interface in its final state, with the pointer’s short script that leads to it |
Link items[].link · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat the link leads to ("Discover scheduling") |
| action* | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action opens, if any |
Options options · 2 props
| Prop | Type | Description |
|---|---|---|
| tone | 'brand' | 'primary' | 'accent' | the colour family of the panel behind the mini-interfaces when there is no picture; brand by default |
| 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 |
| asset | a picture’s address as your app serves it |
| Link | your router’s link component |
| 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
- Subtle motion: one short reveal; still under reduced motion
- Real buttons and links, a visible focus
- Asks your app through actions:
items[].link
A product tour section, for home, landing, product pages; it uses @lucide/vue, @vueuse/core, 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
- Code tabs window: one example written in a few languages: a centred code window with the languages as tabs on its top edge; the merchant’s own code only.
- Demo chapters side list: one real video with a chapter list beside its poster; nothing plays until asked: a demo that is worth watching — the merchant’s own only.
- Demo teaser: one framed screen that leans towards the pointer, a chip on it and an action: an invitation to try — the merchant’s own only.
- Dev showcase events table: Event names, trigger descriptions and supplied payload sizes; the merchant’s own only.
- Dev showcase language grid: Language or SDK cards with their own install command; the merchant’s own only.
- Dev showcase steps with code: Ordered instructions with a snippet for each step; the merchant’s own only.
- Line by line rows: one row per line, old and new answers side by side with their values, no boxes: a point-by-point accounting.
- Side tabs: 3 to 5 areas of an app or a service, a list of areas beside one framed screen: walk through it screen by screen — the merchant’s own only.