Methane@methane-ui/*
CSS LayoutsComponentsSkillsTheme BuilderGitHub
← All Components

<mth-event-calendar>

@methane-ui/admin~9.0 KB brotli (kit + Lit)~2.6 KB marginal

Month/week/day schedule calendar (<mth-event-calendar>) powered by CalendarCore, localized FormattingUtils headers, RTL-aware 2D RovingFocusController, and event selection/creation callbacks.

When NOT to use: Use a lightweight @methane-ui/css layout class instead of a custom element when static CSS suffices.

Live Interactive Preview

Interactive StageLive Custom Element · <mth-event-calendar> (@methane-ui/admin)
Ready · interact with <mth-event-calendar>, or toggle Theme, Direction (LTR/RTL), or props above.

Multi-Framework Playground & Snippets

<script type="module" src="@methane-ui/admin/event-calendar"></script>
<mth-event-calendar view="month">Example</mth-event-calendar>

Properties & Attributes

PropertyAttributeTypeDefaultDescription
events—ReadonlyArray<unknown>—Schedule events keyed by ISO date (YYYY-MM-DD).
viewview'month' | 'week' | 'day'"month"Active schedule granularity (month, week, or day).
activeDateactive-datestring""Focused ISO date string (YYYY-MM-DD).

Events

EventDetail TypeDescription
mth-event-select{ event: unknown }Emitted when an existing event pill is clicked.
mth-event-create{ date: string; time?: string }Emitted when a day or time slot create button is clicked.
mth-date-change{ activeDate: string; view: unknown }Emitted when the active date or view changes.

APG Keyboard Matrix

KeyDirectionWhenExpected Behavior
ArrowRightbothcalendar grid has focusmoves to next day (or previous in RTL)
ArrowLeftbothcalendar grid has focusmoves to previous day (or next in RTL)
ArrowDownbothcalendar grid has focusmoves down one week row
ArrowUpbothcalendar grid has focusmoves up one week row
Homebothcalendar grid has focusfocuses the first visible day cell
Endbothcalendar grid has focusfocuses the last visible day cell

Accessibility Checklist

CategoryRequirementVerified By
ariaAll aria-* IDREFs resolve within the same DOM root (ADR-003).scanSameRootAria
focusdelegatesFocus: true with zero host internals.role (ADR-014).lint-plugin & spec-compiler
contrastRenders legible borders, focus outlines, and selection indicators under forced-colors: active.Playwright forced-colors matrix
keyboardImplements all 6 APG keyboard transitions across LTR/RTL.mth-event-calendar.spec.test.ts
i18nRoutes 9 UI/ARIA strings through @methane-ui/core i18n catalog.Locale context test