Subscription schedule split — Storefront block
Prostorefront-subscription-schedule-split · for home, product, landing pages
Subscription schedule split
One offer card beside a day-by-day trial timeline: a single formula with a trial period
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-splitUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import StorefrontSubscriptionScheduleSplit from '@/components/trame/blocks/storefront/storefront-subscription-schedule-split.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>
<StorefrontSubscriptionScheduleSplit v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| eyebrow | string | Wordswhat this is ("Subscription") |
| title* | string | Wordsthe section’s title, in a few words ("Your coffee, every month") |
| lead | string | Wordsone 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 |
| assurance | string | Wordswhat reassures about leaving ("Pause, postpone or cancel in one click"), only what is true |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Offer offers[] · 12 props
| Prop | Type | Description |
|---|---|---|
| name* | string | Wordsthe offer’s name ("Discovery Box") |
| price | number | Datathe price of one delivery (or of the membership) in cents |
| priceLabel | string | Wordswords instead of an amount ("Free the first month") |
| unit | string | Wordswhat the price is per ("/ delivery", "/ year") |
| monthly | number | Datathe per-month equivalent in cents, only when the merchant states it |
| cadence | string | Wordshow often it arrives ("A delivery every 4 weeks"), as the merchant’s system does it |
| contents | string[] | Wordsone thing in the box, or one inclusion |
| image | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| alt | string | Wordswhat the picture shows, when the words do not say it |
| note | string | Wordsa line under the price ("No commitment"), as the merchant wrote it |
| badge | string | Wordsthe merchant’s own mark for this offer ("Most chosen") |
| action | Action | the offer’s call to action: its words and the page action |
Action offers[].action · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat happens ("Choose this box") |
| action* | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action opens, if any |
Step steps[] · 3 props
| Prop | Type | Description |
|---|---|---|
| marker* | string | Wordswhen, short ("Day 0", "Week 2") |
| title* | string | Wordswhat happens ("First box shipped") |
| text | string | Wordsone line more, as the merchant’s system really does it |
Options options · 1 props
| Prop | Type | Description |
|---|---|---|
| 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 |
| money | formats a price, given in cents |
| 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:
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
- Store rating band: A broad download band pairs store links with the merchant’s own sourced rating only, for an established app.
- 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.