Pick a day, pick a slot, confirm.
The prompt32,032 characters
Add the "Booking" component from notboring to my project.
It is licensed for use in my projects — notboring.dev/license. Please:
1. Create the component at a sensible path for this
project, named Booking, from the source below.
2. It needs nothing beyond React.
3. Add the CSS to the project's stylesheet.
4. THE PART THAT NEEDS YOUR JUDGMENT. The CSS reads
these custom properties and does not define them:
--card
--card-rgb
--font-ui
--ink
--ink-3
--ink-4
--ink-rgb
They are notboring's design tokens. Map each one to
whatever this project already uses for the same
job — its own ink, ground, surface and UI font —
rather than defining them as new globals. If the
project has no equivalent, define it locally on
the component's own root so nothing leaks out.
Anything ending -rgb wants three bare numbers,
because the CSS builds rgba() from it.
Keep the comments. They say why the numbers are what
they are, and they are most of what makes this worth
copying rather than rewriting.
--- Booking.tsx ---
import { useEffect, useRef, useState } from "react";
/* ══ Booking ══════════════════════════════════════════════
Pick a day, pick a slot, confirm.
THREE DECISIONS IN ONE CARD, AND THE CARD NEVER CHANGES
SHAPE. The obvious build is a calendar that opens a list
that opens a form — three screens for a thirty-minute
call. Here the week, the slots and the button are on one
surface the whole time, and choosing a day simply changes
which slots are worth pressing. Nothing appears, nothing
is navigated to; the only thing that moves is the choice.
THE CHOSEN DAY IS ONE THING THAT TRAVELS. Five weekday
cells could each carry a fill that fades in when pressed,
and a fill fading in on Wednesday while another fades out
on Tuesday is two events. One ink block sliding from
Tuesday to Wednesday is one, and it is the one that says
these five are positions of the same control. Its x is
arithmetic on the day's index — the cells are laid out by
this file, so nothing has to be measured to know where
they are, and the number is the same at any zoom.
THE BUTTON IS THE RECEIPT. It reads back what you have
The rest — the source and its comments — is what you are buying.