Skip to content
English

Usage

import { EventSchedule } from './EventSchedule.jsx'

// Without onToggle the agenda lives in the page only. Keep it for the visitor:
<EventSchedule
  locale="en"
  sessions={sessions}            // [{ id, start: '09:30', end: '10:15', room, kind, icon?, title, speaker }]
  rooms={{ hall: 'Main hall', studio: 'Studio' }}
  defaultAgenda={savedIds}
  loading={!sessions}
  error={loadError}
  onRetry={reload}
  onToggle={async (id, added) => (await saveAgenda(id, added)).ok}
/>

Props

PropTypeDefaultWhat it does
locale'en' | 'zh-CN' | 'es' | 'ja''en'Language of the built-in text and sample programme; times follow its format.
sessionsArray<{ id, start, end, room, kind: string, icon?, title, speaker }>sample programmeThe sessions in time order. `kind` is any id (its label comes from `labels.kinds`, else the id itself) and `icon` a kit icon name; a kind of break has no agenda toggle. An empty array shows the empty state.
roomsRecord<string, string>sample roomsRoom ids and their names, one tab each between “All” and “My agenda”.
defaultAgenda / agendastring[]—The session ids already in the visitor’s agenda; pass `agenda` to control it yourself.
loadingbooleanfalseShows the skeleton of the programme while it loads.
errorboolean | stringfalseShows the error banner with a retry button; a string replaces its sentence.
onToggle(id, added) => Promise<boolean | void>—Saves a change to the agenda. Resolve false (or throw) to move the toggle back.
onRoomChange / onRetry(room) => void / () => void—A room tab was chosen; the error banner’s retry was pressed.
labelsobject—Replaces any built-in text (keys as in copy.js).

Add it to your project

Copy the prompt into Codex or Claude Code. The agent reads the published source, shows you what it will write and adds the block together with the components it is built from.

EventSchedule.jsxevent-schedule.csscopy.jskit.jsxkit.cssui/base-button/ui/empty-state/ui/timeline/ui/alert-banner/ui/skeleton-shimmer/ui/sliding-tabs/tokens.cssREADME.md

The block, its stylesheet and text, the shared kit, the components it uses and tokens.css install together into one folder.