Slot Picker - React Component | Kokonut UI
Slot Picker
Book a meeting on a day rail. Drag a meeting into a free gap; it hops over existing bookings, resizes in place and shows the host's local time.
Install with
npx shadcn@latest add https://kokonutui.com/r/slot-picker.json
lucide-react, motion
Product walkthrough
with Lena Ortiz
30 min 1 hr 1.5 hr
| Days | 9am | 10am | 11am | 12pm | 1pm | 2pm | 3pm | 4pm | 5pm |
|---|---|---|---|---|---|---|---|---|---|
| Mon | ½h free | ||||||||
| Tue | 3h free | ||||||||
| Wed | 4h free | ||||||||
| Thu | 5h free | ||||||||
| Fri | 6¾h free |
Click a free gap, then drag it to move.
Confirm
Need the whole week? Calendar Schedule is in Kokonut UI Pro
Installation
Slot Picker is a free, open-source React component in the Kokonut UI Inputs collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/slot-picker.tsx, so the code is yours to change.
Copy Text
npx shadcn@latest add @kokonutui/slot-picker
Or add it by hand: install its packages, then copy the source from above into components/kokonutui/slot-picker.tsx.
Copy Text
npm install lucide-react motion
Usage
Copy Text
import SlotPicker from "@/components/kokonutui/slot-picker";
export default function Example() {
return <SlotPicker />;
}
Props
host:{ name: string; title?: string; city?: string; offset?: number }Default{ name: "Lena Ortiz", title: "Product walkthrou…- Who you're booking.
offsetis their clock minus yours, in minutes.
- Who you're booking.
days:SlotDay[]Defaultdemo datadurations:number[]Default[30, 60, 90]- Lengths offered, in minutes.
timezone:stringDefault"Eastern Time, New York"- The guest's time zone, shown under the rail.
onBook:(slot: { date: string; start: number; minutes: number }) => voidclassName:string- Extra classes for the root element.
SlotDay
date: requiredstring(YYYY-MM-DD)open: requiredSpan- Hours you can be booked, in minutes from midnight, in the guest's time.
busy: requiredSpan[]- Meetings already in the calendar.
Span
- Minutes from midnight.
Copy Text
type Span = [number, number];
Dependencies
| Needs | Version | Comes from |
|---|---|---|
lucide-react |
^0.556.0 |
npm, installed by the CLI |
motion |
^12.23.25 |
npm, installed by the CLI |
cn from lib/utils.ts |
shadcn init | |
| React | 19 |
Your app |
| Tailwind CSS | 4 |
Your app |
No provider, font or global CSS to set up: the file works as soon as it lands.