Skip to main content

Agenda Pro

The days ahead as a list, as Calendar's list view and Google Calendar's schedule show them. A WeekStrip on top marks days with events with dots; pick one to start the list there. Each day lists its events under its heading, all-day ones first, with their start, length and color, and a red line at now among today's. Give it a height and it scrolls, with day headings that stick.

import { Agenda } from '@patine-ui/pro';
Loading…
<Agenda events={events} height={420} onEventPress={(e) => alert(e.title)} style={{ width: 380 }} />

Try the props​

Props
days
design
<Agenda events={events} onEventPress={open} />

Example: a physio's day​

A clinic's schedule for one therapist: appointments colored by kind, a free slot left as a gap, and pressing a booking shows its patient and notes under the list.

Loading…
<View style={{ width: '100%', maxWidth: 420, gap: 12 }}>
  <Agenda events={BOOKINGS} days={2} height={380} showNowIndicator onEventPress={(e) => setPicked(BOOKINGS.find((b) => b.id === e.id) ?? null)} />
  {picked ? (
    <Box border radius="lg" padding="md" gap="xs">
      <Text weight="semibold">{picked.title}</Text>
      <Text size="sm" color="textSecondary">{picked.location}</Text>
      <Text>{picked.note}</Text>
    </Box>
  ) : null}
</View>

Events​

Events are the same as the event calendar's: { id, title, start, end?, allDay?, color?, location?, description?, data? }. A missing end is an hour after start (or the whole day for all-day events); an event across midnight shows on each day it touches.

Range and empty days​

The list starts at date (controlled with onDateChange, or defaultDate; the week strip sets it) and runs days days (14). Days with nothing on are left out; showEmptyDays lists them as "No events". showWeekStrip={false} drops the strip, and showNowIndicator={false} the now line.

Loading…
<Agenda events={classes} date={day} onDateChange={setDay} days={5} showEmptyDays style={{ width: 380 }} />

Your own rows​

renderEvent({ event, start, end, time, color, theme }) draws an event's text; the row keeps its time, color bar and press.

Props​

PropTypeDefaultDescription
eventsCalendarEvent[]—{ id, title, start, end?, allDay?, color?, location?, description?, data? }
date / defaultDate / onDateChangeDatetodayThe first day listed.
daysnumber14
showWeekStripbooleantrue
showEmptyDaysbooleanfalse
showNowIndicatorbooleantrue
heightnumber—Scrolls, with sticky headings.
onEventPress(event) => void—
firstDayOfWeek / locale / hour12 / now
renderEvent(info) => ReactNode—
loading / error / onRetry / emptyTitle / emptyDescription / renderEmptyStates.
density / animate / labels / design / theme / accessibilityLabel / style