Package contents side by side — Storefront block
Prostorefront-package-contents-side-by-side · for product pages
Package contents side by side
A product sold as a kit: the specifications and what is in the box, side by side
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-package-contents-side-by-sideUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import StorefrontPackageContentsSideBySide from '@/components/trame/blocks/storefront/storefront-package-contents-side-by-side.vue'
const props = {
title: "Specifications",
intro: "Measured on the finished product, in our workshop.",
groups: [
{
title: "Dimensions",
rows: [
{
label: "Height",
value: "20.5 in"
},
{
label: "Width",
value: "11.8 in"
}
]
},
{
title: "Materials",
rows: [
{
label: "Outside",
value: "Coated cotton canvas, 12.4 oz/yd²"
},
{
label: "Lining",
value: "Recycled polyester"
}
]
}
],
box: [
{
name: "Aubrac bag 22 L"
},
{
name: "Rain cover",
quantity: "× 1"
}
],
measurements: [
{
label: "Height",
value: "20.5 in"
},
{
label: "Width",
value: "11.8 in"
}
]
}
</script>
<template>
<StorefrontPackageContentsSideBySide v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe block’s title ("Features") |
| intro | string | Wordsone sentence on what the details cover |
| groups* | Group[] | the groups shown, in order |
| box* | Box[] | what is in the box, each a name and a quantity |
| summary | string | Wordsan honest line on the results or the changes, as the merchant wrote it |
| measurements | Measurement[] | the box’s measurements, each a label and a value |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Group groups[] · 2 props
| Prop | Type | Description |
|---|---|---|
| title | string | Wordsthe group ("Dimensions", "Materials") |
| rows* | Row[] | the group’s rows, in order |
Row groups[].rows[] · 2 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat the value is about |
| value* | string | Wordsthe value, as the merchant states it |
Box box[] · 2 props
| Prop | Type | Description |
|---|---|---|
| name* | string | Wordsthe box’s name |
| quantity | string | Words("× 2") |
Measurement measurements[] · 2 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat the value is about |
| value* | string | Wordsthe exact measurement supplied by the merchant |
Options options · 2 props
| Prop | Type | Description |
|---|---|---|
| boxTitle | string | Wordsthe in-the-box list’s title ("In the box") |
| 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 |
| 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
A storefront section, for product pages; it uses @lucide/vue.
More storefront blocks
- Order tracker handoff: two or more carriers chained with their own numbers: international or multi-carrier deliveries.
- Order tracker split shipments: one mini tracker per parcel under a global status: an order that leaves in several parcels.
- Order tracker stepper: four fixed stages in a bar with their dates: a short, simple journey told at a glance.
- Order tracker vertical timeline: the status and window on top, then every event of the carrier’s feed: the default for one parcel.
- Pairing suggestions cards: Image-led pairing cards for serving suggestions alongside a product; the merchant’s own only.
- Parcel cart by shipment: when the order leaves in several parcels or to several people: one card per delivery with its own heading and arrival, the summary beside.
- Party details lead plus names: the one who books in a full form, then the others as one compact roster, a row per guest: a larger party where only names (or a meal choice) are needed of the rest.
- Party details per person: a card per guest, the one who books first with every field, the others with theirs, each added or removed in place beside the booking’s summary: a small party whose guests each need a few details.