Ballmac UI home

Rentals 1: rental booking

A rental booking page: choose an item, the days and extras, see price, refundable deposit and pay-today, a clash with days already out named by date, and a reservation that says exactly what was booked.

State

The normal view. Pick a state to see what the block shows while it loads, is empty or fails.

Open in v0 (opens in a new tab)

Installation

$ pnpm dlx shadcn@latest add @ballmac/rentals-1

Usage

Example: rentals-1-demo.tsx
"use client"

import { Rentals1 } from "@/components/ballmac/blocks/rentals-1/rentals-1"

export default function Rentals1Demo() {
  return <Rentals1 />
}

States

Pass state and the block does the rest: skeletons that match its layout, a clear empty message, an error you can retry, and announcements for screen readers.

  • Loading

    Skeleton list and summary under the real heading, announced as loading.

    state="loading"
  • Nothing to rent

    Says there is nothing to rent; emptyState sets the copy.

    state="empty"
  • Could not load

    An alert saying nothing was reserved, with Try again (onRetry). A reservation that fails keeps the choices and says why.

    state="error"

Dependencies

Use with AI

Rental booking. <Rentals1 items={[{ id, name, detail, perDay, deposit, booked?: ['YYYY-MM-DD'] }]} extras={[{ id, name, perDay }]} maxDays={14} today='YYYY-MM-DD' currency='USD' onReserve={({ item, from, to, extras }) => Promise} />. Both ends of the range count as days. A range that includes a booked day is refused and names it. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Rentals 1: rental booking (@ballmac/rentals-1) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • Equipment, vehicle or space hire
  • Any date-range booking with a deposit

Not for

  • A single appointment slot; use salon-1
  • A hotel with rooms and guests; use booking-1

Registry JSON: https://ui.ballmac.com/r/rentals-1.json

Free to use in personal and commercial projects.

Ballmac UI Pro

Need the whole screen, not one piece?

150 premium blocks (dashboards, settings, calendars, mail, shops, onboarding), a private shadcn registry and Figma tokens. Blocks that show data come with loading, empty and error states built in.

Not ready? Try three Pro blocks free

Leave your email and the blocks appear right here, ready to copy. Yours to use in any project.