Rental availability calendar — Storefront block
Prostorefront-rental-availability-calendar · for product, landing pages
Rental availability calendar
A month grid where booked days are struck out, the total beside it: a rental whose availability is the deciding factor
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-availability-calendarUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import StorefrontRentalAvailabilityCalendar from '@/components/trame/blocks/storefront/storefront-rental-availability-calendar.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.",
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"
}
],
month: "2026-11",
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>
<StorefrontRentalAvailabilityCalendar v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordswhat is rented ("Rent an e-bike") |
| text | string | Wordsone or two sentences on the rental: pick-up place, what is provided |
| 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 |
| deposit | number | the deposit in cents, not part of the total |
| depositNote | string | Wordswhat the deposit is ("Card hold, released when the gear is returned") |
| extras | Extra[] | extras to add to the rental, each with its price |
| unavailable | Unavailable[] | the days already booked or closed, as ranges, inclusive |
| month* | string | Designthe first month the calendar shows, as YYYY-MM; the host sets it, the block never reads the clock |
| start | string | Designthe first day the form starts with, if any, as YYYY-MM-DD |
| end | string | Designthe last day the form starts with, if any, as YYYY-MM-DD |
| minDays | number | the shortest rental, in days |
| maxDays | number | the longest rental, in days |
| action* | string | Actionthe page action that takes the booking (a POST: start, end, extras); it receives the item |
| record | Record<string, unknown> | Datathe item being rented |
| submitLabel* | string | Wordswhat the button says ("Book") |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Rate rates[] · 2 props
| Prop | Type | Description |
|---|---|---|
| from* | number | the first number of days this rate applies to |
| perDay* | number | the price per day in cents from that length on |
Extra extras[] · 4 props
| Prop | Type | Description |
|---|---|---|
| id* | string | Datathe extra’s id |
| label* | string | Wordsthe extra ("Helmet", "Lock", "Child seat") |
| price* | number | its price in cents |
| per* | 'day' | 'rental' | charged every day or once for the rental |
Unavailable unavailable[] · 2 props
| Prop | Type | Description |
|---|---|---|
| from* | string | Dataa booked day, as YYYY-MM-DD |
| to* | string | Dataa booked day, as YYYY-MM-DD |
Options options · 2 props
| Prop | Type | Description |
|---|---|---|
| eyebrow | string | Wordswhat kind of rental it is ("Day rental") |
| 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 |
| 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:
action - Reads
ratesfrom your app
A storefront section, for product, landing 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 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.
- Reissue offer split: The selected item's picture beside its production facts and reservation link; the merchant's own result only.
- 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.
- Request status steps: a request waiting on someone: the steps so far, who decides, and what the customer can do meanwhile.