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

<mth-booking-widget>

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

Form-associated date & time slot booking widget (<mth-booking-widget>) combining CalendarCore date selection, time-slot picking, summary confirmation, and FormControlController validation.

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-booking-widget> (@methane-ui/admin)
Ready · interact with <mth-booking-widget>, or toggle Theme, Direction (LTR/RTL), or props above.

Multi-Framework Playground & Snippets

<script type="module" src="@methane-ui/admin/booking-widget"></script>
<mth-booking-widget>Example</mth-booking-widget>

Properties & Attributes

PropertyAttributeTypeDefaultDescription
namenamestring""Form field name submitted in FormData.
valuevaluestring""Selected booking slot (YYYY-MM-DDTHH:mm).
disableddisabledbooleanfalseDisables date, time-slot, and confirmation controls.
readonlyreadonlybooleanfalsePrevents slot selection changes.
requiredrequiredbooleanfalseMarks booking slot selection as required.
errorerrorstring""Custom validation error text.
availableSlots—ReadonlyArray<unknown>—Optional per-date override slot arrays.
defaultSlots—ReadonlyArray<string>—Default time slots offered for dates without overrides.

Events

EventDetail TypeDescription
mth-change{ value: string; date: string; time: string }Emitted when the selected date/time slot changes.
mth-confirm{ value: string; date: string; time: string }Emitted when the booking confirmation button is clicked.

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
statesExposes ElementInternals CustomStateSet flags: :state(disabled), :state(readonly), :state(required), :state(invalid), :state(user-invalid).Conformance suite
i18nRoutes 9 UI/ARIA strings through @methane-ui/core i18n catalog.Locale context test