Offers panel launcher stack — Storefront block
Freestorefront-offers-panel-launcher-stack · for home, catalog, cart pages
Offers panel launcher stack
A small pill fixed at the bottom corner with the count, opening a compact card of thumbnail rows: offers always at hand on a catalogue or cart page; the merchant’s own offers only
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-offers-panel-launcher-stackUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import StorefrontOffersPanelLauncherStack from '@/components/trame/blocks/storefront/storefront-offers-panel-launcher-stack.vue'
const props = {
title: "Current offers",
lead: "The workshop’s discounts and extras, while they last.",
offers: [
{
title: "Free shipping over $60",
text: "Within the contiguous US, every piece wrapped in recycled paper.",
image: "https://images.unsplash.com/photo-1607166452427-7e4477079cb9?w=1200&q=80",
alt: "A closed kraft cardboard box on a white background",
label: "Visit the shop",
action: "catalog"
},
{
title: "Buy two bowls, get the third half price",
text: "On all speckled stoneware bowls; the discount applies in the cart.",
image: "https://images.unsplash.com/photo-1530006498959-b7884e829a04?w=1200&q=80",
alt: "Two speckled white stoneware bowls stacked on a dark background",
label: "See the bowls",
action: "category",
record: {
id: "bols"
}
}
]
}
</script>
<template>
<StorefrontOffersPanelLauncherStack v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe panel’s name ("Current offers") |
| lead | string | Wordsone sentence under the title |
| offers* | Offer[] | the merchant’s real current offers, 1 to 12 |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Offer offers[] · 8 props
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe offer as the merchant states it ("Free delivery from €60") |
| text | string | Wordsone line of conditions ("Across the whole shop, in mainland France") |
| image | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| alt | string | Wordswhat the picture shows |
| label* | string | Wordsthe button’s words ("See the bowls") |
| action* | string | Actionthe page the offer leads to |
| record | Record<string, unknown> | Datathe record the action opens, if any |
| endsAt | string | Wordsthe end date the merchant gives, as written ("Until 24 December"); never a countdown |
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 |
| 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:
offers[]
A storefront section, for home, catalog, cart pages; it uses @lucide/vue, @vueuse/core.
Built with
The components this block is made of; each one installs on its own too.
More storefront blocks
- Mini cart receipt: a short cart with character, for a shop with a crafted or retro voice: a narrow till-receipt ticket, each line running to its price along a dotted leader, the total under a double rule.
- Offer popup code: A centered selectable code with its terms in the host's dialog; the merchant's own offer only.
- Offer popup slide in: A compact nonblocking card positioned by the host; the merchant's own offer only.
- Open books cost breakdown: lines with their amount and a thin proportional bar, and the total: where the price of a product goes; the merchant’s own only.
- Order confirmation card: one centred card with the order, its delivery and its actions: the default after a payment.
- Order confirmation receipt: the order’s four facts side by side above its lines and totals: a customer who wants the record at a glance.
- Order confirmation table: a bordered panel with the order’s header and a table of items: orders with many lines or a delivery date per line.
- Order detail sheet: a side sheet over the order list, closed back to it: opening one order without leaving the history.