Progress bar — Steps block

Free

steps-progress-bar · for home, landing, product, app pages

Progress bar

A short flow in stages, a segmented bar with the duration of each: order, setup or delivery in 4 stages

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/steps-progress-bar

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import StepsProgressBar from '@/components/trame/blocks/steps/steps-progress-bar.vue'

const props = {
title: "How it works",
intro: "From order to delivery, four steps we handle ourselves.",
steps: [
{
title: "Choose your style",
text: "Browse the collection, filter by size and color, and save what you like.",
icon: "search",
tag: "2 minutes",
media: "https://images.unsplash.com/photo-1441984904996-e0b6ba687e04?w=1600&q=80",
alt: "Inside a clothing store, with racks under pendant lights"
},
{
title: "Place your order",
text: "Secure one-page checkout, by card or in 3 installments.",
icon: "credit-card",
tag: "Under 3 minutes",
media: "https://images.unsplash.com/photo-1509017174183-0b7e0278f1ec?w=1600&q=80",
alt: "A person paying for a purchase on their phone"
}
],
cta: {
label: "Start my order",
action: "collection",
record: {
id: "tout"
}
}
}
</script>

<template>
<StepsProgressBar v-bind="props" />
</template>

Props

Each prop says who changes it: Words, Picture, Action, Design, Data.* required.

PropTypeDescription
title*stringWordsthe section’s title, an h2 ("How it works")
introstringWordsone or two sentences under the title
steps*Step[]the steps shown, in order
ctaCtathe call to action: its words and the page action it runs
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Step steps[] · 8 props
PropTypeDescription
title*stringWordswhat happens at this step, in a few words
textstringWordsone or two sentences about it
iconstringDesignan icon name ("package", "truck", "credit-card"…); a number when absent or unknown
mediastringPicturethe merchant’s own picture or screenshot of this step
altstringWordswhat the picture shows, when the words do not say it
tagstringWordsa duration or a moment, exactly as the merchant knows it ("in 5 minutes"): never invented
bulletsstring[]Wordsone detail of the step
resultstringWordswhat the customer holds at the end of this step ("A signed quote"), as the merchant knows it
Cta cta · 3 props
PropTypeDescription
label*stringWordswhat happens ("Start")
action*stringActiona named action of the page
recordRecord<string, unknown>Datathe record the action opens, if any
Options options · 2 props
PropTypeDescription
numbering'none' | 'number' | 'zero-padded'how steps are numbered: none, 1 2 3, or 01 02 03
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
  • Subtle motion: one short reveal; still under reduced motion
  • Real buttons and links, a visible focus
  • Asks your app through actions: cta

A steps section, for home, landing, product, app pages; it uses @lucide/vue, class-variance-authority, clsx, motion, reka-ui, tailwind-merge.

More steps blocks

  • Process diagram gantt: A bounded schedule across the supplied periods, scrollable on phones; the merchant’s own only.
  • Process diagram lanes: Responsibilities grouped by the supplied lane and period; the merchant’s own only.
  • Recurring process radial: A circular numbered map and a readable legend for recurring work; the merchant’s own only.
  • Workflow branches diagram: Explicit connections show forks and rejoins, with a text equivalent; the merchant’s own only.

All 14 steps blocks