# Calendar agenda

A controlled month calendar that becomes a usable agenda on narrow screens, with native date, navigation, and event actions.

Access: pro. Category: Blocks. Kind: composite.

## When to use

- Use it when a page needs a controlled month calendar that becomes a usable agenda on narrow screens, with native date, navigation, and event actions.
- Choose it inside an authenticated product surface when the host application owns routing, persistence, and service calls.

## Alternatives

- Choose empty-state instead when empty collections, search results and errors with a clear next action is the actual interface need, rather than calendar agenda.

## Setup for agents

Use React 19 and TypeScript. Initialize shadcn for your framework, then merge this exact entry into components.json:

```json
{
  "registries": {
    "@tidal-pro": {
      "url": "https://tidalui.com/r/pro/{name}.json",
      "headers": {
        "Authorization": "Bearer ${TIDALUI_TOKEN}"
      }
    }
  }
}
```

The namespace must be named **@tidal-pro** because transitive Pro dependencies use that namespace. Obtain an agent key from your active Pro account at https://tidalui.com/account. Keep TIDALUI_TOKEN in your local environment, never in components.json, client code, Git or logs.

```sh
export TIDALUI_TOKEN='your-private-agent-key'
npx shadcn@latest add @tidal-pro/waitlist-form
npx shadcn@latest add https://tidalui.com/r/tidal-button.json
```

Free command: `npx shadcn@latest add https://tidalui.com/r/<name>.json`.
Pro command: `npx shadcn@latest add @tidal-pro/<name>`.

Import the base stylesheet and every stylesheet listed on the installed item's metadata. For example:

```tsx
import "./components/ui/tidal.css";
import "./components/ui/hero-section.css";
// Place installed components inside this wrapper:
<div className="tidal-scope" data-theme="dark">...</div>
```

Omit data-theme for the default light theme. Put the attribute on the same tidal-scope element for dark mode. Every component installs the shared free tidal-base dependency. After upgrading, run `npx shadcn@latest add https://tidalui.com/r/tidal-base.json --overwrite` to receive current tokens. Review local modifications before overwriting.

Vite: Use React + TypeScript. Map @/* to ./src/* in paths and Vite resolve.alias. Import tidal.css and each component stylesheet in your application entry.

Next.js 15 App Router: Next.js App Router: import tidal.css and component CSS in app/layout.tsx. Interactive examples belong in a client component with "use client". Map @/* to ./* or ./src/* to match your project.

TypeScript 6: use paths without baseUrl:

```json
{
  "compilerOptions": {
    "paths": {
      "@/*": [
        "./src/*"
      ]
    }
  }
}
```

Pro registry requests are server/CLI-only. Use the same-origin account interface in a browser; cross-origin Authorization preflights are intentionally unsupported.


## Install Calendar agenda

```sh
npx shadcn@latest add @tidal-pro/calendar-agenda
```

Stylesheets: `components/ui/tidal.css`, `components/ui/calendar-agenda.css`.

## Minimal example

```tsx
import"./components/ui/tidal.css";
import"./components/ui/calendar-agenda.css";
import{TidalCalendarAgenda}from"./components/ui/calendar-agenda";
export default(p:Parameters<typeof TidalCalendarAgenda>[0])=><div className="tidal-scope"><TidalCalendarAgenda {...p}/></div>;
```

## Structured props

- `TidalCalendarAgenda.days: ReadonlyArray<TidalCalendarDay>`: Required days value accepted by this exported component.
- `TidalCalendarAgenda.next: TidalCalendarNavigationAction`: Required next value accepted by this exported component.
- `TidalCalendarAgenda.onDateSelect: (day: TidalCalendarDay, event: ReactMouseEvent<HTMLButtonElement>) => void`: Callback invoked when the date select interaction is proposed.
- `TidalCalendarAgenda.previous: TidalCalendarNavigationAction`: Required previous value accepted by this exported component.
- `TidalCalendarAgenda.title: ReactNode`: Required title value accepted by this exported component.
- `TidalCalendarAgenda.visibleMonthLabel: ReactNode`: Required visible month label value accepted by this exported component.
- `TidalCalendarAgenda.weekdays: ReadonlyArray<TidalCalendarWeekday>`: Required weekdays value accepted by this exported component.
- `TidalCalendarAgenda.description?: ReactNode`: Optional description value accepted by this exported component.
- `TidalCalendarAgenda.emptyMessage?: ReactNode` (default "No dates are available for this view."): Optional empty message value accepted by this exported component.
- `TidalCalendarAgenda.eyebrow?: ReactNode`: Optional eyebrow value accepted by this exported component.
- `TidalCalendarAgenda.footer?: ReactNode`: Optional footer value accepted by this exported component.
- `TidalCalendarAgenda.headingLevel?: "h2" | "h3" | "h4" | undefined` (default "h2"): Optional heading level value accepted by this exported component.
- `TidalCalendarAgenda.labels?: Partial<TidalCalendarAgendaLabels> | undefined`: Optional labels value accepted by this exported component.
- `TidalCalendarAgenda.selectedDate?: string | undefined`: Optional selected date value accepted by this exported component.

## Complete usage example

[Source](https://tidalui.com/examples/calendar-agenda.tsx) | [Manifest](https://tidalui.com/examples/calendar-agenda.json). Install the listed additional dependencies. Consumer fixture: TypeScript pass; Vite pass. This fixture check is distinct from the actual shadcn install receipt.

```tsx
"use client";

import "./components/ui/tidal.css";

import { useId, useLayoutEffect, useRef, useState } from "react";

import { ChevronLeft, ChevronRight } from "lucide-react";

import { TidalCalendarAgenda, type TidalCalendarDay, type TidalCalendarEvent } from "./components/ui/calendar-agenda";

import "./components/ui/calendar-agenda.css";



const tidalExampleStyles = ".tidal-scope .calendar-agenda-demo {\n  display: grid;\n  width: min(100%, 1160px);\n  min-width: 0;\n  gap: 16px;\n  margin-inline: auto;\n}\n\n.tidal-scope .calendar-agenda-demo-detail {\n  min-width: 0;\n  padding: 20px;\n  color: var(--t-surface);\n  background: var(--t-ink);\n  border-radius: var(--t-radius-card);\n  scroll-margin-block: 18px;\n}\n\n.tidal-scope .calendar-agenda-demo-detail > span {\n  color: color-mix(in srgb, var(--t-surface) 68%, transparent);\n  font-size: 11px;\n  font-weight: 760;\n  letter-spacing: 0.13em;\n  text-transform: uppercase;\n}\n\n.tidal-scope .calendar-agenda-demo-detail h3 {\n  margin: 8px 0 0;\n  font-size: 24px;\n  line-height: 1;\n  letter-spacing: -0.04em;\n  overflow-wrap: anywhere;\n}\n\n.tidal-scope .calendar-agenda-demo-detail p {\n  max-width: 70ch;\n  margin: 10px 0 0;\n  color: color-mix(in srgb, var(--t-surface) 74%, transparent);\n  font-size: 11px;\n  line-height: 1.6;\n  overflow-wrap: anywhere;\n}\n\n.tidal-scope .calendar-agenda-demo-detail > div {\n  display: flex;\n  flex-wrap: wrap;\n  gap: 8px 16px;\n  margin-top: 15px;\n  padding-top: 12px;\n  color: color-mix(in srgb, var(--t-surface) 72%, transparent);\n  border-top: 1px solid color-mix(in srgb, var(--t-surface) 22%, transparent);\n  font-size: 11px;\n}\n\n.tidal-scope .calendar-agenda-demo-detail:focus-visible {\n  outline: 2px solid var(--t-accent);\n  outline-offset: 3px;\n}\n\n@media (prefers-reduced-motion: reduce) {\n  .tidal-scope .calendar-agenda-demo * {\n    scroll-behavior: auto !important;\n  }\n}";

type MonthId = "october" | "november";

type DayDefinition = readonly [
  date: string,
  label: string,
  monthName: string,
  outsideMonth?: boolean,
];

interface SampleEvent {
  id: string;
  date: string;
  label: string;
  timeLabel: string;
  timeValue: string;
  meta: string;
  detail: string;
  kind: "link" | "button";
}

const WEEKDAYS = [
  { id: "sun", label: "Sun", accessibleLabel: "Sunday" },
  { id: "mon", label: "Mon", accessibleLabel: "Monday" },
  { id: "tue", label: "Tue", accessibleLabel: "Tuesday" },
  { id: "wed", label: "Wed", accessibleLabel: "Wednesday" },
  { id: "thu", label: "Thu", accessibleLabel: "Thursday" },
  { id: "fri", label: "Fri", accessibleLabel: "Friday" },
  { id: "sat", label: "Sat", accessibleLabel: "Saturday" },
] as const;

const OCTOBER_DATES: readonly DayDefinition[] = [
  ["2026-09-27", "27", "September", true],
  ["2026-09-28", "28", "September", true],
  ["2026-09-29", "29", "September", true],
  ["2026-09-30", "30", "September", true],
  ["2026-10-01", "1", "October"],
  ["2026-10-02", "2", "October"],
  ["2026-10-03", "3", "October"],
  ["2026-10-04", "4", "October"],
  ["2026-10-05", "5", "October"],
  ["2026-10-06", "6", "October"],
  ["2026-10-07", "7", "October"],
  ["2026-10-08", "8", "October"],
  ["2026-10-09", "9", "October"],
  ["2026-10-10", "10", "October"],
  ["2026-10-11", "11", "October"],
  ["2026-10-12", "12", "October"],
  ["2026-10-13", "13", "October"],
  ["2026-10-14", "14", "October"],
  ["2026-10-15", "15", "October"],
  ["2026-10-16", "16", "October"],
  ["2026-10-17", "17", "October"],
  ["2026-10-18", "18", "October"],
  ["2026-10-19", "19", "October"],
  ["2026-10-20", "20", "October"],
  ["2026-10-21", "21", "October"],
  ["2026-10-22", "22", "October"],
  ["2026-10-23", "23", "October"],
  ["2026-10-24", "24", "October"],
  ["2026-10-25", "25", "October"],
  ["2026-10-26", "26", "October"],
  ["2026-10-27", "27", "October"],
  ["2026-10-28", "28", "October"],
  ["2026-10-29", "29", "October"],
  ["2026-10-30", "30", "October"],
  ["2026-10-31", "31", "October"],
];

const NOVEMBER_DATES: readonly DayDefinition[] = [
  ["2026-11-01", "1", "November"],
  ["2026-11-02", "2", "November"],
  ["2026-11-03", "3", "November"],
  ["2026-11-04", "4", "November"],
  ["2026-11-05", "5", "November"],
  ["2026-11-06", "6", "November"],
  ["2026-11-07", "7", "November"],
  ["2026-11-08", "8", "November"],
  ["2026-11-09", "9", "November"],
  ["2026-11-10", "10", "November"],
  ["2026-11-11", "11", "November"],
  ["2026-11-12", "12", "November"],
  ["2026-11-13", "13", "November"],
  ["2026-11-14", "14", "November"],
  ["2026-11-15", "15", "November"],
  ["2026-11-16", "16", "November"],
  ["2026-11-17", "17", "November"],
  ["2026-11-18", "18", "November"],
  ["2026-11-19", "19", "November"],
  ["2026-11-20", "20", "November"],
  ["2026-11-21", "21", "November"],
  ["2026-11-22", "22", "November"],
  ["2026-11-23", "23", "November"],
  ["2026-11-24", "24", "November"],
  ["2026-11-25", "25", "November"],
  ["2026-11-26", "26", "November"],
  ["2026-11-27", "27", "November"],
  ["2026-11-28", "28", "November"],
  ["2026-11-29", "29", "November"],
  ["2026-11-30", "30", "November"],
  ["2026-12-01", "1", "December", true],
  ["2026-12-02", "2", "December", true],
  ["2026-12-03", "3", "December", true],
  ["2026-12-04", "4", "December", true],
  ["2026-12-05", "5", "December", true],
];

const SAMPLE_EVENTS: readonly SampleEvent[] = [
  {
    id: "component-review",
    date: "2026-10-14",
    label: "Component review",
    timeLabel: "9:30 AM",
    timeValue: "2026-10-14T09:30",
    meta: "Studio",
    detail:
      "Review the fictional component queue and record local notes for the sample workspace.",
    kind: "link",
  },
  {
    id: "release-notes",
    date: "2026-10-16",
    label: "Release notes pass",
    timeLabel: "1:00 PM",
    timeValue: "2026-10-16T13:00",
    meta: "Editorial",
    detail:
      "Check the fictional release-note outline shown only in this local preview.",
    kind: "button",
  },
  {
    id: "copy-review",
    date: "2026-10-23",
    label: "Navigation copy review",
    timeLabel: "11:15 AM",
    timeValue: "2026-10-23T11:15",
    meta: "Product",
    detail:
      "Compare concise sample navigation labels without sending or publishing anything.",
    kind: "link",
  },
  {
    id: "search-review",
    date: "2026-11-03",
    label: "Search states review",
    timeLabel: "10:00 AM",
    timeValue: "2026-11-03T10:00",
    meta: "Product",
    detail:
      "Inspect fictional search states inside the local component preview.",
    kind: "button",
  },
  {
    id: "motion-review",
    date: "2026-11-12",
    label: "Reduced motion review",
    timeLabel: "2:30 PM",
    timeValue: "2026-11-12T14:30",
    meta: "Accessibility",
    detail:
      "Read a fictional review note about finite motion and static reduced-motion states.",
    kind: "link",
  },
];

const MONTHS: Record<
  MonthId,
  { label: string; definitions: readonly DayDefinition[] }
> = {
  october: { label: "October 2026", definitions: OCTOBER_DATES },
  november: { label: "November 2026", definitions: NOVEMBER_DATES },
};

export function CalendarAgendaDemo() {
  const generatedId = useId().replace(/:/g, "");
  const detailId = `calendar-agenda-${generatedId}-detail`;
  const [monthId, setMonthId] = useState<MonthId>("october");
  const [selectedDate, setSelectedDate] = useState("2026-10-14");
  const [activeEventId, setActiveEventId] = useState("component-review");
  const previousRef = useRef<HTMLButtonElement>(null);
  const nextRef = useRef<HTMLButtonElement>(null);
  const navigationFocus = useRef<"previous" | "next" | null>(null);
  const activeEvent = SAMPLE_EVENTS.find(
    (event) => event.id === activeEventId,
  )!;
  const month = MONTHS[monthId];

  useLayoutEffect(() => {
    const target = navigationFocus.current;
    if (!target) return;
    navigationFocus.current = null;
    (target === "previous" ? previousRef.current : nextRef.current)?.focus({
      preventScroll: true,
    });
  }, [monthId]);

  function activateEvent(event: SampleEvent) {
    setSelectedDate(event.date);
    setActiveEventId(event.id);
  }

  const eventItems = new Map<string, TidalCalendarEvent[]>();
  SAMPLE_EVENTS.forEach((sample) => {
    const item: TidalCalendarEvent =
      sample.kind === "link"
        ? {
            kind: "link",
            id: sample.id,
            label: sample.label,
            accessibleLabel: `${sample.label}, ${sample.timeLabel}`,
            href: `#${detailId}`,
            time: { label: sample.timeLabel, dateTime: sample.timeValue },
            meta: sample.meta,
            selected: sample.id === activeEventId,
            onAction: () => activateEvent(sample),
          }
        : {
            kind: "button",
            id: sample.id,
            label: sample.label,
            accessibleLabel: `${sample.label}, ${sample.timeLabel}`,
            time: { label: sample.timeLabel, dateTime: sample.timeValue },
            meta: sample.meta,
            selected: sample.id === activeEventId,
            onAction: () => activateEvent(sample),
          };
    eventItems.set(sample.date, [...(eventItems.get(sample.date) ?? []), item]);
  });

  const days: readonly TidalCalendarDay[] = month.definitions.map(
    ([date, label, monthName, outsideMonth]) => ({
      date,
      label,
      accessibleLabel: `${monthName} ${label}, 2026`,
      outsideMonth,
      today: date === "2026-10-14",
      events: eventItems.get(date),
    }),
  );

  function showMonth(nextMonth: MonthId) {
    navigationFocus.current = nextMonth === "october" ? "next" : "previous";
    setMonthId(nextMonth);
    setSelectedDate(nextMonth === "october" ? "2026-10-14" : "2026-11-03");
    setActiveEventId(
      nextMonth === "october" ? "component-review" : "search-review",
    );
  }

  return (
    <section
      className="calendar-agenda-demo"
      aria-label="Calendar agenda preview"
    >
      <TidalCalendarAgenda
        title="Workspace agenda"
        description="Choose a date to view sample events."
        visibleMonthLabel={month.label}
        weekdays={WEEKDAYS}
        days={days}
        selectedDate={selectedDate}
        previous={{
          label: (
            <>
              <ChevronLeft size={15} aria-hidden="true" /> Previous
            </>
          ),
          accessibleLabel: "Show October 2026",
          disabled: monthId === "october",
          buttonRef: previousRef,
          onAction: () => showMonth("october"),
        }}
        next={{
          label: (
            <>
              Next <ChevronRight size={15} aria-hidden="true" />
            </>
          ),
          accessibleLabel: "Show November 2026",
          disabled: monthId === "november",
          buttonRef: nextRef,
          onAction: () => showMonth("november"),
        }}
        onDateSelect={(day) => setSelectedDate(day.date)}
        footer="Fictional dates and local React state only. No event is scheduled, saved, requested, or sent."
      />

      <article
        id={detailId}
        className="calendar-agenda-demo-detail"
        tabIndex={-1}
      >
        <span>Local event detail</span>
        <h3>{activeEvent.label}</h3>
        <p>{activeEvent.detail}</p>
        <div>
          <time dateTime={activeEvent.timeValue}>{activeEvent.timeLabel}</time>
          <span>{activeEvent.meta}</span>
        </div>
      </article>
    </section>
  );
}

export default function AgentExample() {
  return (
    <div className="tidal-scope" data-theme="light" dir="ltr">
      <style>{tidalExampleStyles}</style>
      <CalendarAgendaDemo />
    </div>
  );
}

```

## Gotchas

- The host application owns data, validation, persistence, navigation, and service side effects described by this API.

## Theme and accessibility

{"tokens":["--t-accent","--t-border","--t-border-strong","--t-canvas","--t-danger","--t-display","--t-ease-out","--t-ease-spring","--t-faint","--t-font","--t-ink","--t-line","--t-muted","--t-primary","--t-primary-contrast","--t-radius-card","--t-radius-control","--t-radius-overlay","--t-radius-panel","--t-ring","--t-shadow-lg","--t-shadow-soft","--t-soft","--t-subtle","--t-surface","--t-wash"],"darkMode":true}

{"keyboard":["Tab and Shift+Tab follow the component's native focus order.","Arrow-key behavior follows the exported composite-control implementation."],"aria":"The component wires labels and relationships from consumer-provided visible text or ARIA props; preserve those labels in production.","notes":"Verify focus visibility, text alternatives, contrast, and reduced motion in the final composition."}

title, visibleMonthLabel, seven consumer-supplied weekdays, date-only day records, previous/next actions and onDateSelect are required. Days require a supplied date-only string, visible label and accessible label, with optional outside-month/today/disabled state, events, native button attributes/ref. Today uses native aria-current=date. Events are typed native links or buttons with visible/accessibility labels, optional native time/meta/selected/disabled state, attributes/ref and consumer callback. Empty-string hrefs and explicit aria-disabled false are preserved; boolean or string aria-disabled true resolves disabled link behavior; modified link navigation stays native; disabled links suppress caller handling and navigation. Button/day/navigation native handlers run before higher callbacks, and preventDefault suppresses the higher callback. Button type defaults to button while native form ownership remains available. Optional heading level, eyebrow, description, navigation/weekdays/calendar/today/no-events labels, emptyMessage, footer and native section attributes/ref remain consumer-owned. Consumers supply all dates, labels, selected state, month transitions, event destinations and outcomes. The component performs no date parsing, timezone conversion, recurrence, scheduling, request, network, storage or persistence action.
