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

<mth-bottom-sheet>

@methane-ui/ui~11.2 KB brotli (cold + Lit)~3.8 KB marginal

Mobile-friendly modal bottom sheet backed by <dialog>, OverlayController, FocusTrapController, MotionController, and detent snapping.

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-bottom-sheet> (@methane-ui/ui)
Open Bottom SheetSelect Deployment Region

Supports half, full, and collapsed detents with swipe & Escape dismissal.

Done
Ready · interact with <mth-bottom-sheet>, or toggle Theme, Direction (LTR/RTL), or props above.

Multi-Framework Playground & Snippets

<script type="module" src="@methane-ui/ui/bottom-sheet"></script>
<mth-bottom-sheet detent="collapsed" closable>Example</mth-bottom-sheet>

Properties & Attributes

PropertyAttributeTypeDefaultDescription
openopenbooleanfalseControls whether the bottom sheet is open.
detentdetent'collapsed' | 'half' | 'full'"half"Current vertical snap height (collapsed, half, or full).
closableclosablebooleantrueRenders a close button in the sheet header.
lightDismisslight-dismissbooleantrueAllows closing the sheet by clicking the backdrop.
closeOnEscapeclose-on-escapebooleantrueAllows closing the sheet when pressing Escape.
labellabelstring""Accessible title announced for the sheet dialog.

Events

EventDetail TypeDescription
mth-openundefinedCancelable event fired before opening the sheet.
mth-after-openundefinedFired after the sheet finishes opening.
mth-close{ reason: string }Cancelable event fired before closing the sheet.
mth-after-closeundefinedFired after the sheet closes.
mth-detent-change{ detent: 'collapsed' | 'half' | 'full' }Fired when the active detent changes.

APG Keyboard Matrix

KeyDirectionWhenExpected Behavior
EscapebothopenCloses the bottom sheet and restores focus to trigger.
ArrowUpbothhandle focusedExpands the sheet detent.
ArrowDownbothhandle focusedCollapses or dismisses the sheet.

Accessibility Checklist

CategoryRequirementVerified By
ariaAll aria-* IDREFs resolve within the same DOM root (ADR-003).scanSameRootAria
focusFocus ownership matches focusModel="none".lint-plugin & spec-compiler
contrastRenders legible borders, focus outlines, and selection indicators under forced-colors: active.Playwright forced-colors matrix
keyboardImplements all 3 APG keyboard transitions across LTR/RTL.mth-bottom-sheet.spec.test.ts
statesExposes ElementInternals CustomStateSet flags: :state(open), :state(detent-collapsed), :state(detent-half), :state(detent-full), :state(dragging).Conformance suite
i18nRoutes 3 UI/ARIA strings through @methane-ui/core i18n catalog.Locale context test