Subscription schedule timeline — Storefront block

Pro

storefront-subscription-schedule-timeline · for home, product, landing pages

Subscription schedule timeline

The first weeks told step by step along a timeline, one action below: a subscription whose rhythm reassures

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/storefront-subscription-schedule-timeline

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import StorefrontSubscriptionScheduleTimeline from '@/components/trame/blocks/storefront/storefront-subscription-schedule-timeline.vue'

const props = {
eyebrow: "Subscription",
title: "Your coffee, every month",
lead: "Choose your box size. It arrives at your door, freshly roasted, whenever you decide.",
offers: [
{
name: "Discovery Box",
price: 1900,
unit: "/ delivery",
monthly: 1900,
cadence: "One delivery a month",
contents: [
"2 coffees, 8.8 oz each",
"A tasting card"
],
image: "https://images.unsplash.com/photo-1695245503558-5cdb37f49092?w=1600&q=80",
alt: "An unlabeled kraft coffee bag on a light table",
note: "No commitment",
action: {
label: "Choose Discovery",
action: "subscribe",
record: {
id: "decouverte"
}
}
},
{
name: "Regular Box",
price: 3400,
unit: "/ delivery",
monthly: 3400,
cadence: "One delivery a month",
contents: [
"4 coffees, 8.8 oz each",
"A tasting card"
],
image: "https://images.unsplash.com/photo-1447933601403-0c6688de566e?w=1600&q=80",
alt: "Roasted coffee beans",
badge: "Most popular",
action: {
label: "Choose Regular",
action: "subscribe",
record: {
id: "habitue"
}
}
}
],
steps: [
{
marker: "Day 0",
title: "You subscribe",
text: "You choose your box and your delivery day."
},
{
marker: "Day 2",
title: "First box ships",
text: "Roasted the day before, it goes out as a tracked parcel."
}
],
assurance: "You can skip, pause or cancel from your account, whenever you like."
}
</script>

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

Props

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

PropTypeDescription
eyebrowstringWordswhat this is ("Subscription")
title*stringWordsthe section’s title, in a few words ("Your coffee, every month")
leadstringWordsone or two sentences under the title: what arrives, how often
offers*Offer[]the subscription offers, each with its price and rhythm
steps*Step[]the steps shown, in order
assurancestringWordswhat reassures about leaving ("Pause, postpone or cancel in one click"), only what is true
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Offer offers[] · 12 props
PropTypeDescription
name*stringWordsthe offer’s name ("Discovery Box")
pricenumberDatathe price of one delivery (or of the membership) in cents
priceLabelstringWordswords instead of an amount ("Free the first month")
unitstringWordswhat the price is per ("/ delivery", "/ year")
monthlynumberDatathe per-month equivalent in cents, only when the merchant states it
cadencestringWordshow often it arrives ("A delivery every 4 weeks"), as the merchant’s system does it
contentsstring[]Wordsone thing in the box, or one inclusion
imagestringPicturea picture: a root-relative path (/media/…) or an absolute URL
altstringWordswhat the picture shows, when the words do not say it
notestringWordsa line under the price ("No commitment"), as the merchant wrote it
badgestringWordsthe merchant’s own mark for this offer ("Most chosen")
actionActionthe offer’s call to action: its words and the page action
Action offers[].action · 3 props
PropTypeDescription
label*stringWordswhat happens ("Choose this box")
action*stringActiona named action of the page
recordRecord<string, unknown>Datathe record the action opens, if any
Step steps[] · 3 props
PropTypeDescription
marker*stringWordswhen, short ("Day 0", "Week 2")
title*stringWordswhat happens ("First box shipped")
textstringWordsone line more, as the merchant’s system really does it
Options options · 1 props
PropTypeDescription
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
moneyformats a price, given in cents
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: offers[].action

A storefront section, for home, product, landing 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 storefront blocks

  • Styled three ways: the same piece in three scenes, each with its own pieces, the constant piece under them: one piece, three lives.
  • Subscription plans feature offer: one formula told large with its picture, the other formulas as a slim list beneath: a favourite among several.
  • Subscription plans offer rows: two to six formulas as wide ruled rows (name, cadence, contents in a line, price, action): a long list read like a menu.
  • Subscription plans size cards: two to four box sizes or formulas as cards with their contents, price per delivery and action: a subscription with sizes.
  • Suggested product band: one suggested product on a slim, quiet band (cart or end of a product page): its picture, one line on why, its price and one action, no box around it.
  • Symbol guide label and symbols: A label picture beside its symbols explained (care, allergens, energy…) and their consequences; the merchant's own guidance only.
  • Takeback story split: a picture beside the steps and a few values as pills: a short programme told with one strong picture.
  • Tasting notes chips: An open tasting notebook of note chips and descriptions for a nuanced product; the merchant’s own only.

All 409 storefront blocks