Flows workflow tabs — Hero block
Prohero-flows-workflow-tabs · for home, landing pages
Flows workflow tabs
A product explained by its flows: centred words over a tab row, each tab a short chain of steps
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/hero-flows-workflow-tabsUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import HeroFlowsWorkflowTabs from '@/components/trame/blocks/hero/hero-flows-workflow-tabs.vue'
const props = {
title: "From the order to the doorstep, without a single phone call",
subtitle: "Haulwise plans tomorrow’s routes, tells customers when the van is close and files the proof of delivery, so dispatch can look after the exceptions.",
primaryAction: {
label: "Plan your first route",
action: "signup"
},
secondaryAction: {
label: "Talk to a dispatcher",
action: "contact"
},
tabs: [
{
label: "Deliveries",
nodes: [
{
title: "A delivery is booked",
text: "From your store, your warehouse or a phone call.",
kind: "trigger"
},
{
title: "It joins tomorrow’s route",
text: "Grouped by street, sized to the van.",
kind: "action"
}
]
},
{
label: "Missed stops",
nodes: [
{
title: "Nobody answers the door",
kind: "trigger"
},
{
title: "Is there a safe place?",
text: "As the customer noted when booking.",
kind: "condition"
}
]
}
],
options: {
eyebrow: "New: evening delivery runs",
note: "Free for fleets of up to three vans"
}
}
</script>
<template>
<HeroFlowsWorkflowTabs v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe one promise, in a sentence (60 to 90 characters at most) |
| subtitle | string | Wordswhat it connects and for whom, in one or two sentences |
| primaryAction* | PrimaryAction | the main button: its words and the page action it runs |
| secondaryAction | SecondaryAction | a quieter second action beside the main one: its words and the page action |
| tabs* | Tab[] | the use cases, one tab each, e.g. "Orders" |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
PrimaryAction primaryAction · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat happens ("See the integrations") |
| action* | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action opens, if any |
SecondaryAction secondaryAction · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat happens ("See the integrations") |
| action* | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action opens, if any |
Tab tabs[] · 2 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsa use case, two or three words ("Orders") |
| nodes* | Node[] | the steps of the flow, in order |
Node tabs[].nodes[] · 3 props
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsone step of the flow |
| text | string | Wordswhat happens in it, in one line |
| kind | string | Designthe step’s role, for its icon: trigger, action, condition, result |
Options options · 3 props
| Prop | Type | Description |
|---|---|---|
| eyebrow | string | Wordsa short chip above the title ("New") |
| note | string | Wordsfine print under the actions |
| 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 |
| 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:
primaryAction,secondaryAction
A hero section, for home, landing 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 hero blocks
- Finder: a product choice that needs a few questions: the first question shown, the real finder one click away.
- Float deck: the title set on the left and the pictures fanned on the right like a hand of cards, the first product in front: 2 to 4 products with one to lead, a more personal, collected opening.
- Float orbit: the title above, the pictures in a gentle arc under it, the middle one largest: 2 to 4 products, a calmer opening.
- Float scatter: the pictures around the title at different sizes and depths, as if set down on a table: 3 or 4 products that read well alone.
- Form card: the promise and what the visitor gets on one side, a framed form panel on the other: a quote or a demo that asks a few questions.
- Globe beside: a team, a network of makers or depots, with more to say: the words at the left and a whole dotted globe at the right, its first places named on leaders; the merchant’s own places only.
- Globe rising: a brand whose argument is where it makes or ships, told in few words: the words centred over a large dotted hemisphere rising from the bottom edge, its pins named on hover and listed under it; the merchant’s own places only.
- Image overlay: one strong, wide picture of the shop’s own: the title and the action laid over it on a legible wash, the picture across the whole width.