Sticky media — Steps block
Freesteps-sticky-media · for home, landing, product, app pages
Sticky media
3 to 5 steps that each have their own picture: the heading and the picture of the step in view stay in place while the steps scroll beside them with oversized numbers
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-sticky-mediaUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import StepsStickyMedia from '@/components/trame/blocks/steps/steps-sticky-media.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>
<StepsStickyMedia 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 ("How it works") |
| intro | string | Wordsone or two sentences under the title |
| steps* | Step[] | the steps shown, 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 |
Step steps[] · 8 props
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordswhat happens at this step, in a few words |
| text | string | Wordsone or two sentences about it |
| icon | string | Designan icon name ("package", "truck", "credit-card"…); a number when absent or unknown |
| media | string | Picturethe merchant’s own picture or screenshot of this step |
| alt | string | Wordswhat the picture shows, when the words do not say it |
| tag | string | Wordsa duration or a moment, exactly as the merchant knows it ("in 5 minutes"): never invented |
| bullets | string[] | Wordsone detail of the step |
| result | string | Wordswhat the customer holds at the end of this step ("A signed quote"), as the merchant knows it |
Cta cta · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat happens ("Start") |
| 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 |
|---|---|---|
| numbering | 'none' | 'number' | 'zero-padded' | how steps are numbered: none, 1 2 3, or 01 02 03 |
| 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
- 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, @vueuse/core, 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.