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

<mth-split-pane>

@methane-ui/ui~6.8 KB brotli (cold + Lit)~1.4 KB marginal

Two-pane splitter with accessible role="separator" keyboard control, pointer-capture drag resizing, and CSP-safe adopted stylesheet layout.

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-split-pane> (@methane-ui/ui)
Source Spec (45%)
Live Preview (55%)
Ready · interact with <mth-split-pane>, or toggle Theme, Direction (LTR/RTL), or props above.

Multi-Framework Playground & Snippets

<script type="module" src="@methane-ui/ui/split-pane"></script>
<mth-split-pane orientation="horizontal" ratio="50"></mth-split-pane>

Properties & Attributes

PropertyAttributeTypeDefaultDescription
orientationorientation'horizontal' | 'vertical'"horizontal"Split axis (horizontal side-by-side or vertical stacked).
ratiorationumber50Start pane percentage from minRatio to maxRatio.
minRatiomin-rationumber0Minimum allowed start pane percentage.
maxRatiomax-rationumber100Maximum allowed start pane percentage.
stepstepnumber5Arrow key increment in percentage points.
stepLargestep-largenumber15PageUp/PageDown increment in percentage points.
disableddisabledbooleanfalseDisables pointer and keyboard resizing.
labellabelstring""Accessible aria-label for the divider separator.

Events

EventDetail TypeDescription
mth-resize{ ratio: number }Fired whenever the split ratio changes via pointer or keyboard.

APG Keyboard Matrix

KeyDirectionWhenExpected Behavior
ArrowLeftbothHorizontal divider separator is focusedAdjusts split ratio toward start (or end in RTL)
ArrowRightbothHorizontal divider separator is focusedAdjusts split ratio toward end (or start in RTL)
ArrowUpbothVertical divider separator is focusedDecreases start pane ratio
ArrowDownbothVertical divider separator is focusedIncreases start pane ratio
HomebothDivider separator is focusedSets ratio to minRatio
EndbothDivider separator is focusedSets ratio to maxRatio

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-split-pane.spec.test.ts
statesExposes ElementInternals CustomStateSet flags: :state(disabled), :state(dragging).Conformance suite
i18nRoutes 1 UI/ARIA strings through @methane-ui/core i18n catalog.Locale context test