Views stepper side — Hero block

Pro

hero-views-stepper-side · for home, landing, app pages

Views stepper side

The words on the left with a numbered stepper under the actions, the chosen screen on the right running off the page: screens that follow an order (set up, run, report).

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-views-stepper-side

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import HeroViewsStepperSide from '@/components/trame/blocks/hero/hero-views-stepper-side.vue'

const props = {
title: "Teach the lesson. Fermata handles the timetable and the fees.",
subtitle: "One tool for students, lessons and term payments, built for piano, guitar and voice teachers who work on their own.",
primaryAction: {
label: "Try it free",
action: "signup"
},
secondaryAction: {
label: "See pricing",
action: "pricing"
},
views: [
{
label: "Students",
icon: "chart",
image: "https://images.unsplash.com/photo-1496181133206-80ce9b88a853?w=1600&q=80",
alt: "An open laptop, screen off, on a light wood cabinet",
caption: "Every student, their pieces and how far they got last week, before the doorbell rings."
},
{
label: "Schedule",
icon: "calendar",
image: "https://images.unsplash.com/photo-1484788984921-03950022c9ef?w=1600&q=80",
alt: "An open laptop, screen black, next to a coffee",
caption: "The week’s lessons, with make-up slots when someone cancels."
}
],
options: {
eyebrow: "New: make-up lesson slots",
note: "Free for up to five students"
}
}
</script>

<template>
<HeroViewsStepperSide 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): the page’s h1
subtitlestringWordswhat it is 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
views*View[]2 to 5 screens of the product, one per job; a sixth is never shown, one alone shows no switcher
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
PrimaryAction primaryAction · 3 props
PropTypeDescription
label*stringWordswhat happens ("Try for free")
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 ("Try for free")
action*stringActiona named action of the page
recordRecord<string, unknown>Datathe record the action opens, if any
View views[] · 5 props
PropTypeDescription
label*stringWordsthe screen’s job in one to three words ("Schedule", "Invoices")
iconstringDesigncalendar | route | workflow | form | chart | inbox | users | invoice | package | settings; none when absent
image*stringPicturethe screen’s screenshot, as the product is today
altstringWordswhat the screenshot shows, when the caption does not say it
captionstringWordsone line on what this screen does
Options options · 4 props
PropTypeDescription
eyebrowstringWordsa short chip above the title ("New: reports")
notestringWordsfine print under the actions ("No bank card")
frame'browser' | 'plain'browser (by default): a browser window around the screenshot; plain: a rounded picture
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
asseta picture’s address as your app serves it
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, 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 hero blocks

  • Video ambient: the film plays by itself, muted and in a loop, behind the words at the foot of the first screen, with a pause button and a "Watch the film" button for the whole film with its sound: a place, a craft or a product in use, shown before it is told; a short file of a few MB, the merchant’s own film only.
  • Video device side: the words beside a phone holding a vertical film, over a tinted disc: a mobile app, a reel or a portrait film; the merchant’s own film only.
  • Video framed below: the words centred first, then a wide framed film that straightens as the page scrolls: a product or a service whose promise must be read before the film; the merchant’s own film only.
  • Video poster overlay: the film’s still fills the first screen with the words at its foot: the film is the argument (a founder, a workshop, a place); the merchant’s own film only.
  • Video split card: the words beside a rounded player card naming the person on screen: a quieter landing or a customer story; the merchant’s own film only.
  • Wall card over grid: a dense grid of square pictures edge to edge with the words on a solid card over its middle: a portfolio whose pictures are all of one hand (the merchant’s own work only).
  • Wall columns drift: columns of pictures set at different heights and fading at the top and the bottom, the card in front; at the expressive level the columns drift with the scroll: an atmospheric opening for a studio or a maker.
  • Wall side grid: the words on the left, a calm 3 by 3 (or 3 by 4) grid of equal pictures on the right: a quieter brand whose words must read first.

All 102 hero blocks