BookingCard

Pick a day, pick a time, book. One pill slides between choices and the button names what you are about to book. Cards.

Open playground

Dr. Lena Park

30 min intro call

About

BookingCard is a React component in the Cards category of smoui. It is typed, ships no stylesheet, follows your theme through CSS variables, and honors prefers-reduced-motion. Import it with import { BookingCard } from "@ashutoshswamy/smoui" and set name, days, onBook.

Install

Terminal
npm i @ashutoshswamy/smoui

Usage

TSX
import { BookingCard } from "@ashutoshswamy/smoui";

<BookingCard name="Dr. Lena Park" role="Intro call" days={[{ label: "Tue 14", slots: ["9:00", "10:30"] }]} onBook={(day, slot) => reserve(day, slot)} />

Props 3

name / role

Who is being booked.

string
days

Choices. One pill per day, a grid of times for the chosen one.

{ label; slots: string[] }[]
onBook

Called on Book. A rejected promise lets you try again.

(day, slot) => void | Promise