Reissue offer split — Storefront block

Pro

storefront-reissue-offer-split · for landing, catalog pages

Reissue offer split

The selected item's picture beside its production facts and reservation link; the merchant's own result 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-reissue-offer-split

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import StorefrontReissueOfferSplit from '@/components/trame/blocks/storefront/storefront-reissue-offer-split.vue'

const props = {
title: "A new edition is in the works",
intro: "Tell the workshop which one you’d like.",
result: {
item: {
id: "besace",
name: "The wayfarer’s satchel",
summary: "A soft shape that sits close to the body.",
period: "First collection",
image: "https://images.unsplash.com/photo-1473188588951-666fce8e7c68?w=1600&q=80",
alt: "A satchel in weathered brown leather, resting on a stone"
},
reserve: {
label: "Explore the project",
action: "reissue"
},
details: {
label: "Read the original product page",
action: "archive-entry"
}
},
note: "Fictional demo: no votes are recorded in the playground."
}
</script>

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

Props

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

PropTypeDescription
title*stringWordsthe section’s heading
introstringWordsa sentence or two under the heading
closesAtstringDatathe actual closing date as supplied by the host
closedbooleantrue: the vote is closed
result*ResultDatathe vote’s result, once it is closed
notestringWordsa short note under the section
errorstringWordswhat went wrong with the last action, as the host words it
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Result result · 8 props
PropTypeDescription
item*Itemthe piece that won the vote
runSizenumberhow many will be made
shipsstringWordswhen it ships, as the merchant writes it
pricenumberthe reissue’s price in cents
currencystringDesignISO 4217, EUR by default
outcomestringWordswhat the vote decided, in the merchant’s words
reserveReservethe reserve link: its words and where it leads
detailsDetailsthe details link: its words and where it leads
Item result.item · 8 props
PropTypeDescription
id*string | numberDatathe record’s id in the tool that answers it
name*stringWordsthe product’s name
imagestring | nullPicturethe main picture; null or absent: the product has none yet
altstringWordswhat the main picture shows
summarystringWordsone short line on the product
periodstringWordsthe period it comes from, e.g. "1998"
votesnumberDataactual recorded votes, never optimistically incremented
sharenumberDataactual share supplied by the voting service
Reserve result.reserve · 4 props
PropTypeDescription
label*stringWordsthe link’s words, e.g. "See the collection"
actionstringActiona named action of the page
recordRecord<string, unknown>Datathe record the action applies to, passed to the host with it, if any
urlstringDesignan address outside the app
Details result.details · 4 props
PropTypeDescription
label*stringWordsthe link’s words, e.g. "See the collection"
actionstringActiona named action of the page
recordRecord<string, unknown>Datathe record the action applies to, passed to the host with it, if any
urlstringDesignan address outside the app
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
asseta picture’s address as your app serves it
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: result.reserve, result.details
  • Reads votes from your app

A storefront section, for landing, catalog pages; it uses @lucide/vue, class-variance-authority, clsx, reka-ui, tailwind-merge.

Built with

The components this block is made of; each one installs on its own too.

More storefront blocks

  • Referral invite code beside: a referral programme: the rules on one side, the visitor’s own code to copy on the other.
  • Referral steps numbered: a landing section that explains how it works: three numbered steps, each side’s reward and the link under them.
  • Refund choice side by side: two or three outcomes in columns (card refund, credit, exchange), each with its delay and steps: the choice is the point.
  • Refund delays bars: refund delays by method: one row each, a bar sized to the delay and the delay written out.
  • Rental availability calendar: a month grid where booked days are struck out, the total beside it: a rental whose availability is the deciding factor.
  • Rental booking card split: a booking card beside the item’s picture and its rate table: a product page for an item rented by the day.
  • Rental dates inline: a wide booking bar: two date fields, the extras and the total side by side: a rental page where the dates are the first question.
  • Repeat order table: a buyer who orders the same things each season: the last order laid out to repeat, then adjust.

All 409 storefront blocks