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

<mth-range-slider>

@methane-ui/ui~7.9 KB brotli (cold + Lit)~2.0 KB marginal

Form-associated dual-thumb range slider with independent start and end ARIA slider thumbs, min-distance clamping, and RTL support.

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

Multi-Framework Playground & Snippets

<script type="module" src="@methane-ui/ui/range-slider"></script>
<mth-range-slider value="25,75" default-value="25,75"></mth-range-slider>

Properties & Attributes

PropertyAttributeTypeDefaultDescription
namenamestring""Form submission field name.
valuevaluestring"25,75"Comma-separated pair "start,end".
defaultValuedefault-valuestring"25,75"Default "start,end" restored on form reset.
startstartnumber25Current start value.
endendnumber75Current end value.
minminnumber0Minimum selectable value.
maxmaxnumber100Maximum selectable value.
stepstepnumber1Step increment.
minDistancemin-distancenumber0Minimum gap maintained between start and end thumbs.
labellabelstring""Accessible group label.
hinthintstring""Helper message.
errorerrorstring""Validation error message.
sizesize'sm' | 'md' | 'lg'"md"Visual scale.
showValueshow-valuebooleanfalseShows formatted start - end values.
disableddisabledbooleanfalseDisables both thumbs.
readonlyreadonlybooleanfalsePrevents edits while keeping focusability.
formatValue—((value: number) => string) | nullnullCustom numeric formatter.

Events

EventDetail TypeDescription
mth-input{ start: number; end: number; value: string }Dispatched while dragging or stepping either thumb.
mth-change{ start: number; end: number; value: string }Dispatched when a thumb adjustment commits.

APG Keyboard Matrix

KeyDirectionWhenExpected Behavior
ArrowRightltreither thumb focusedincreases focused thumb value by step
ArrowLeftrtleither thumb focusedincreases focused thumb value in RTL
PageUp / PageDownbotheither thumb focusedmoves focused thumb by ten steps
Home / Endbotheither thumb focusedmoves focused thumb to valid lower/upper bound

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 4 APG keyboard transitions across LTR/RTL.mth-range-slider.spec.test.ts
statesExposes ElementInternals CustomStateSet flags: :state(dirty), :state(touched), :state(user-invalid), :state(disabled).Conformance suite
i18nRoutes 3 UI/ARIA strings through @methane-ui/core i18n catalog.Locale context test