Flows workflow tabs — Hero block

Pro

hero-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-tabs

Usage

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.

PropTypeDescription
title*stringWordsthe one promise, in a sentence (60 to 90 characters at most)
subtitlestringWordswhat it connects and for whom, in one or two sentences
primaryAction*PrimaryActionthe main button: its words and the page action it runs
secondaryActionSecondaryActiona quieter second action beside the main one: its words and the page action
tabs*Tab[]the use cases, one tab each, e.g. "Orders"
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
PrimaryAction primaryAction · 3 props
PropTypeDescription
label*stringWordswhat happens ("See the integrations")
action*stringActiona named action of the page
recordRecord<string, unknown>Datathe record the action opens, if any
SecondaryAction secondaryAction · 3 props
PropTypeDescription
label*stringWordswhat happens ("See the integrations")
action*stringActiona named action of the page
recordRecord<string, unknown>Datathe record the action opens, if any
Tab tabs[] · 2 props
PropTypeDescription
label*stringWordsa use case, two or three words ("Orders")
nodes*Node[]the steps of the flow, in order
Node tabs[].nodes[] · 3 props
PropTypeDescription
title*stringWordsone step of the flow
textstringWordswhat happens in it, in one line
kindstringDesignthe step’s role, for its icon: trigger, action, condition, result
Options options · 3 props
PropTypeDescription
eyebrowstringWordsa short chip above the title ("New")
notestringWordsfine print under the actions
mood'inverse' | 'brand' | 'warm' | 'tint' | stringa 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).

MemberWhat it is for
hrefthe address an action leads to, or null to hide what leads there
actruns a change (subscribe, add to cart, save) and answers { ok } or { ok: false, error }
canwhether the page has this action
Linkyour router’s link component
cartCountthe cart badge’s number
cartDrawerwhether your app has a cart drawer
cartOpenwhether the cart drawer is open
labelyour 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:

KeyEnglishFrench
newsletter.alreadyYou are already subscribed.Vous êtes déjà inscrit.
newsletter.doneDone: you are subscribed.C’est noté : vous êtes inscrit.
newsletter.invalidCheck the email address.Vérifiez l’adresse e-mail.
newsletter.tooManyToo 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.

All 102 hero blocks