Availability Slots
Bookable time buttons for a single day — the Cal.com-style picker. Pair with Calendar for the date, and use Availability when hosts edit weekly free hours.
Gallery
Calendar + time list — pick a day, then choose a free opening.
Loading…
Installation
CLI
Also needs
npx @sonojs/ui@latest add buttonUsage
availability-slots.tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| slots | AvailabilityTimeSlot[] | - | Bookable openings (`id`, `startMinutes`, optional `endMinutes` / `label` / `disabled`). |
| value | string · null | - | Controlled selected slot id. |
| defaultValue | string · null | null | Initial selection when uncontrolled. |
| onValueChange | (value: string · null) => void | - | Fires on select; click again to clear. |
| columns | 1 · 2 · 3 | 1 | Button grid density. |
| emptyText | string | "No times available" | Copy when `slots` is empty. |
| disabled | boolean | false | Disables every slot. |
| className | string | - | Merged onto the root. |
Related
- Availability, edit weekly free hours
- Calendar, pick the booking day
- Field, label the time list