Demo teaser — Product tour block
Proproduct-tour-demo-teaser · for home, landing, app pages
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.
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-demo-teaserUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import ProductTourDemoTeaser from '@/components/trame/blocks/product-tour/product-tour-demo-teaser.vue'
const props = {
title: "Tour the tool before you try it",
intro: "Five screens, the ones you’ll use every day. These are real screenshots of the tool.",
scenes: [
{
label: "Orders",
title: "All your orders, sorted by what’s left to do",
text: "Pack, ship, refund: every order shows its stage and its next step.",
media: "https://images.unsplash.com/photo-1585060282215-39a72f82385c?w=1600&q=80",
alt: "A hand holds a smartphone with a blank screen, on a white background",
persona: "For day-to-day running",
time: "0:00",
action: "page",
record: {
id: "orders"
}
},
{
label: "Catalog",
title: "A catalog that updates in one click",
text: "Prices, stock and photos are edited in one place.",
media: "https://images.unsplash.com/photo-1496181133206-80ce9b88a853?w=1600&q=80",
alt: "An open laptop, screen off, on a light wood cabinet",
persona: "For makers",
time: "0:48",
action: "page",
record: {
id: "catalogue"
}
}
],
cta: {
label: "Try it free",
action: "page",
record: {
id: "essai"
}
}
}
</script>
<template>
<ProductTourDemoTeaser 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 |
| scenes* | Scene[] | the tour’s scenes, in order |
| cta | Cta | the call to action: its words and the page action it runs |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Scene scenes[] · 9 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe short name of this screen or area, for tabs and chips ("Orders") |
| title* | string | Wordswhat this screen shows, in a sentence-title |
| text | string | Wordsone or two sentences on what the visitor does there |
| media | string | Picturethe merchant’s own real screenshot or photo |
| alt | string | Wordswhat the picture shows, when the words do not say it |
| persona | string | Wordswho it is for ("To give as gifts"), in persona-grid |
| time | string | Wordswhere this chapter starts in the video, as "1:20" (a real chapter of the real video) |
| action | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action opens, if any |
Cta cta · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat happens ("Try") |
| 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 |
|---|---|---|
| frame | 'none' | 'browser' | 'phone' | the device drawn around the pictures (browser by default in side-tabs and demo-teaser) |
| 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
- Expressive motion, within its budget; still under reduced motion
- Real buttons and links, a visible focus
- Asks your app through actions:
scenes[],cta
A product tour section, for home, landing, app 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
- 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.
- 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.
- 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.