npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-calendar.json --yesCalendar
ProA month always in view, to choose a date or a range of dates, for React and Tailwind CSS. Part of Goop Pro.
What an agent sees
import { Calendar } from '@/components/ui/goop/calendar';
import { useState } from 'react';
function StayCalendar() {
const [stay, setStay] = useState<{ from: Date | undefined; to?: Date | undefined } | null>(null);
return (
<Calendar
aria-label="Stay"
mode="range"
numberOfMonths={2}
minDate={new Date()}
minNights={2}
maxNights={14}
disabledDays={[new Date(2026, 11, 24)]}
value={stay}
onValueChange={setStay}
/>
);
}Pick a look. Month: pick a delivery day; past days, Sundays and one closing day are refused. Range and Two months: pick a start, point at a later day to see the band it would make, and pick its end. Rules: a booking of two to six nights that never crosses the closed day. Dropdowns: a date of birth, decades back through the caption’s month and year lists. The arrows move by day, PageUp and PageDown by month. Nothing is delivered or booked; the closing days are our own, counted from today.
When to use
- A month always in view, to choose a date or a range of dates.
- Also called: month view or date grid.
When not to use
- For a field that opens on a press, use DatePicker or DateRangePicker.
Installation
Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Calendar on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing. As a Pro part, its command comes from Goop's server once you sign in, with a one-time link that lasts ten minutes.
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-calendar.json --yesAdd the Goop Calendar to this project. The install steps are at https://goop.so/docs/install.mdUsage
import { Calendar } from '@/components/ui/goop/calendar';
import { useState } from 'react';
function StayCalendar() {
const [stay, setStay] = useState<{ from: Date | undefined; to?: Date | undefined } | null>(null);
return (
<Calendar
aria-label="Stay"
mode="range"
numberOfMonths={2}
minDate={new Date()}
minNights={2}
maxNights={14}
disabledDays={[new Date(2026, 11, 24)]}
value={stay}
onValueChange={setStay}
/>
);
}- Fits: schedule, flow: aside.
- height, width, corner, border, background, text: add no class for these.
API reference
| Option | Type | What it does |
|---|---|---|
| disabled? | boolean | Whether the calendar is disabled: every day refused, both paging buttons held. |
| mode? | 'single' | 'range' = 'single' | One date is chosen at a time. Or: A range: a first press its start, a second its end, a third starts over. |
| value? | Date | null | DatePickerRange | null | The chosen date, when the caller holds it (null for none); with onValueChange. Or: The chosen range, when the caller holds it. |
| defaultValue? | Date | DatePickerRange | The date chosen at first, when the calendar holds it. Or: The range chosen at first, when the calendar holds it. |
| onValueChange? | ((value: Date | null) => void) | ((value: DatePickerRange | null) => void) | Called with the date chosen, or null when it is pressed again. Or: Called with the range after each press (to undefined until its end is chosen), or null for none. |
| minNights? | number | The fewest nights a range spans; a shorter one starts over. |
| maxNights? | number | The most nights a range spans; a longer one starts over at the pressed date. |
| allowDisabledInRange? | boolean | Let a range cross days that cannot be chosen (its ends still can't be one). |
- Takes every prop of DatePickerPanel but dayClassName, cellClassName and headClassName (its page: date-picker.md)
- Another example of it: date-picker-choices.md
- State: value (value / defaultValue / onValueChange); drawn by data-selected, data-outside-month, data-disabled
- Types: DatePickerRange = { from: Date | undefined; to?: Date | undefined }
- data-slot values (to select a part by): calendar, calendar-set
Keyboard
| Key | What it does |
|---|---|
| ArrowLeft ArrowRight | Move to the day before or after (the other way in right-to-left) |
| ArrowUp ArrowDown | Move a week back or on |
| Home End | Move to the first or last day of the week |
| PageUp PageDown | Move a month back or on, paging the month |
| Shift+PageUp Shift+PageDown | Move a year back or on |
| Shift+ArrowUp Shift+ArrowDown Shift+ArrowLeft Shift+ArrowRight | Move a year (up or down) or a month (left or right) |
| Enter Space | Choose the focused day |
Accessibility
- The part itself answers the keys above.
- hover, focus-visible: the browser's own (:hover, :focus-visible): write nothing
Its states are drawn from attributes and props, so assistive technology and your agent read the same thing:
| State | Drawn by |
|---|---|
| selected | the attribute data-selected |
| outside-month | the attribute data-outside-month |
| disabled | the attribute data-disabled |
Notes for AI
Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.