Rental booking card split — Storefront block

Pro

storefront-rental-booking-card-split · for product, landing pages

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

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-rental-booking-card-split

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import StorefrontRentalBookingCardSplit from '@/components/trame/blocks/storefront/storefront-rental-booking-card-split.vue'

const props = {
title: "Rent an electric city bike",
text: "Pick up and drop off at the workshop, 9 a.m. to 6 p.m. The bike comes adjusted to your size, with a charged battery and a key lock.",
image: "https://images.unsplash.com/photo-1501236570302-906143a7c9f8?w=1600&q=80",
alt: "A blue city bike leaning against a red wall, next to a bench",
rates: [
{
from: 1,
perDay: 3500
},
{
from: 3,
perDay: 2900
}
],
deposit: 30000,
depositNote: "Card hold, released when the bike comes back in good condition.",
extras: [
{
id: "helmet",
label: "Helmet",
price: 300,
per: "day"
},
{
id: "bag",
label: "Rear pannier",
price: 500,
per: "rental"
}
],
unavailable: [
{
from: "2026-11-13",
to: "2026-11-15"
},
{
from: "2026-11-21",
to: "2026-11-22"
}
],
start: "2026-11-04",
end: "2026-11-08",
minDays: 1,
action: "rental.book",
record: {
id: "velo-ville"
},
submitLabel: "Book this bike",
options: {
eyebrow: "Daily rental"
}
}
</script>

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

Props

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

PropTypeDescription
title*stringWordswhat is rented ("Rent an e-bike")
textstringWordsone or two sentences on the rental: pick-up place, what is provided
imagestringPicturea picture: a root-relative path (/media/…) or an absolute URL
altstringWordswhat the picture shows
rates*Rate[]Datathe merchant’s own rate table: the longer the rental, the lower the day price. The total is the days times the rate of the longest tier reached
depositnumberthe deposit in cents, not part of the total
depositNotestringWordswhat the deposit is ("Card hold, released when the gear is returned")
extrasExtra[]extras to add to the rental, each with its price
unavailableUnavailable[]the days already booked or closed, as ranges, inclusive
startstringDesignthe first day the form starts with, if any, as YYYY-MM-DD
endstringDesignthe last day the form starts with, if any, as YYYY-MM-DD
minDaysnumberthe shortest rental, in days
maxDaysnumberthe longest rental, in days
action*stringActionthe page action that takes the booking (a POST: start, end, extras); it receives the item
recordRecord<string, unknown>Datathe item being rented
submitLabel*stringWordswhat the button says ("Book")
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Rate rates[] · 2 props
PropTypeDescription
from*numberthe first number of days this rate applies to
perDay*numberthe price per day in cents from that length on
Extra extras[] · 4 props
PropTypeDescription
id*stringDatathe extra’s id
label*stringWordsthe extra ("Helmet", "Lock", "Child seat")
price*numberits price in cents
per*'day' | 'rental'charged every day or once for the rental
Unavailable unavailable[] · 2 props
PropTypeDescription
from*stringDataa booked day, as YYYY-MM-DD
to*stringDataa booked day, as YYYY-MM-DD
Options options · 2 props
PropTypeDescription
eyebrowstringWordswhat kind of rental it is ("Day rental")
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
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: action
  • Reads rates from your app

A storefront section, for product, landing pages; it uses @lucide/vue, @vueuse/core, 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

  • 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.
  • Reissue offer split: The selected item's picture beside its production facts and reservation link; the merchant's own result only.
  • 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 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.
  • Request status steps: a request waiting on someone: the steps so far, who decides, and what the customer can do meanwhile.
  • Restock notice email form: a sold-out category: the merchant’s restocks and an email field to be told.

All 409 storefront blocks