MonthSchedule
Month grid that shows dated events inside each day, with a type legend and a small-screen agenda.
Design intent
Directories need to show events inside days, not just pick one. MonthSchedule reuses Calendar's date utilities (ISO keys, calendarWeeks, explicit today) so server-rendered pages stay deterministic, and collapses to an agenda list below a breakpoint where day cells get too cramped.
npx @slipstream-ui/cli@latest add month-scheduleMar 7, 2026
Mar 14, 2026
Mar 21, 2026
Mar 28, 2026
- Competition
- Workshop
- Social
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| events | T[] | — | Events placed inside days via getDate. |
| getDate | (event: T) => string | — | ISO date key (YYYY-MM-DD) per event. |
| getLabel | (event: T) => string | — | Short label on the day chip and in the agenda. |
| getType | (event: T) => string | — | Optional type key for chip color and legend. |
| getHref | (event: T) => string | — | Optional destination per event. |
| month | string | — | Controlled month as YYYY-MM; falls back to defaultMonth, then today. |
| defaultMonth | string | — | Uncontrolled initial month (YYYY-MM). |
| onMonthChange | (month: string) => void | — | Fired with the new YYYY-MM when paging. |
| today | string | — | Override "today" for deterministic SSR and tests. |
| maxPerDay | number | 3 | Chips per day before collapsing into "+N more". |
| legend | MonthScheduleLegendItem[] | — | Type → label entries rendered as a legend; fixes chip tones. |
| agendaBreakpoint | 'sm' | 'md' | 'md' | Below this breakpoint an agenda list replaces the grid. |
| linkComponent | React.ElementType | — | Custom link element for event hrefs. |
| linkHrefProp | 'href' | 'to' | 'href' | Prop name used for linkComponent destinations. |
| locale | string | 'en-US' | BCP-47 locale for labels. |
| weekStartsOn | 0 | 1 | 0 | Sunday or Monday first. |
Anti-patterns
validate_usage is the MCP tool that rejects these mistakes: the same list agents see over MCP and in the canonical markdown.
Don't use it to pick a date
MonthSchedule shows events inside days; it has no selection model. Use Calendar or DatePicker when the user must choose a day.
tsx// Avoid<MonthSchedule events={[]} getDate={…} getLabel={…} onSelect={…} />// Prefer<Calendar value={date} onValueChange={setDate} />Don't compute today on the server
Without an explicit today prop the component reads the client clock; pass today from a deterministic source for SSR and tests.
tsx<MonthSchedule today={props.today} … />
Accessibility
- Day cells use role=grid with rows, columnheaders and gridcells; today gets aria-current="date".
- Below agendaBreakpoint a labelled agenda list replaces the grid for small screens.
- The month name sits in an aria-live="polite" region so paging is announced.
Content guidelines
Event labels
- Keep getLabel short — chips truncate; put detail in the destination page
- Legend labels describe the type, not the event
Good examples
- Fall Classic
- Competition
Bad examples
- Fall Classic 2026 — two-day ballroom competition with six heats
- Stuff
Composition
Compose with Calendar: Sibling components sharing the same date utilities; Calendar picks a day, MonthSchedule shows events in days
<Calendar value={date} onValueChange={setDate} /><MonthSchedule events={events} getDate={getDate} getLabel={getLabel} />
Compose with Badge: Day chips and the legend render as sm Badges with deterministic outline tones per type
legend={[{ type: 'social', label: 'Social' }]}
Compose with ListToolbar: Pair with ListToolbar and Pagination when the schedule is one view of a filterable directory
<ListToolbar count={events.length} /><MonthSchedule … />
Related components: Calendar, DatePicker, Badge, ListToolbar, MediaCard
Dependencies
What the registry installs alongside this component. Package imports already include these.
npm packages
- class-variance-authority
- clsx
- tailwind-merge
Browser support
| Browser | Tested versions |
|---|---|
| Chrome | 111+ (Mar 2023) |
| Edge | 111+ (Mar 2023) |
| Firefox | 121+ (Dec 2023) |
| Safari | 17.2+: macOS & iOS (Dec 2023) |
Slipstream components rely only on CSS custom properties, Flexbox/Grid, and ARIA, the everyday baseline of the last two years of evergreen releases. Anything newer is progressive enhancement: unsupported browsers keep full functionality with static behavior instead of animations.