Getting startedComponentsDesign tokensThemingTheme synthesizerFrameworksAccessibilityUtilitiesServer renderingBrowser supportContributingChangelogApp ShellAspect GridAuth ShellCenterContainerDashboard GridFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbarAnchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkMenubarNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkStepper NavTabsTop BarTree ViewAccordionAspect RatioAvatarAvatar GroupCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageImage CompareImage HotspotsInfinite ScrollLightboxMarqueeQR CodeScroll AreaSkeletonSpinnerStackVideoVirtual ListActivity HeatmapAnimated NumberBadgeBar ListChartClockComparisonCountdown TimerData GridDescription ListDiffGaugeJSON TreeKanbanLevel MeterListMeterSparklineStatStepperTagTimelineUptimeValue CardWaveformBlockquoteCode BlockCode GroupGradient TextHighlightKbdKeyboard MapMarkdownNumber FormatProseTerminalTextTime AgoTruncateTypewriterButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerDate Range PickerField ListFieldsetFile UploadFormHotkeyIcon ButtonImage CropperInline EditInputInput GroupKnobLabelMasked InputMulti SelectNumber InputPassword InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSignature PadSliderSortable ListSwitch GroupTag InputTextareaTheme ToggleTime PickerToggleTransfer ListTree SelectAlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuConversationDialogDropdown MenuHover CardLoading OverlayNotification PanelPopoverProgressSheetToastTooltip
ARC UIARC Radiant Components
v4.9DocsComponentsTokensSynthesizer
Getting startedFrameworksServer renderingDesign tokensThemingTheme synthesizerTypographyUtilitiesAll componentsAccessibilityBrowser supportChangelogContributingStatsApp ShellAspect GridAuth ShellCenterContainerDashboard GridFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbarAnchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkMenubarNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkStepper NavTabsTop BarTree ViewAccordionAspect RatioAvatarAvatar GroupCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageImage CompareImage HotspotsInfinite ScrollLightboxMarqueeQR CodeScroll AreaSkeletonSpinnerStackVideoVirtual ListActivity HeatmapAnimated NumberBadgeBar ListChartClockComparisonCountdown TimerData GridDescription ListDiffGaugeJSON TreeKanbanLevel MeterListMeterSparklineStatStepperTagTimelineUptimeValue CardWaveformBlockquoteCode BlockCode GroupGradient TextHighlightKbdKeyboard MapMarkdownNumber FormatProseTerminalTextTime AgoTruncateTypewriterButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerDate Range PickerField ListFieldsetFile UploadFormHotkeyIcon ButtonImage CropperInline EditInputInput GroupKnobLabelMasked InputMulti SelectNumber InputPassword InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSignature PadSliderSortable ListSwitch GroupTag InputTextareaTheme ToggleTime PickerToggleTransfer ListTree SelectAlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuConversationDialogDropdown MenuHover CardLoading OverlayNotification PanelPopoverProgressSheetToastTooltip

Range Slider

A slider with two thumbs for picking a low and a high value. The track between them fills with the accent color.

ComponentsRange Slider
inputinteractive
<arc-range-slider>

Overview

RangeSlider picks an interval, like a price filter or a frequency band, by dragging two thumbs along one track. For a single value, use Slider. With a `label`, a header row shows the label on the left and the current "low – high" values on the right in monospace. `show-values` is on by default. Turn it off with `no-values` to hide the readout. The track is custom, not two stacked native range inputs. Dragging uses pointer capture, and clicking the track moves the nearest thumb there. Each thumb is a focusable `role="slider"` with its own `aria-label` and `aria-valuenow`, `aria-valuemin` and `aria-valuemax`. Arrow keys move a thumb by `step`, and Home and End jump to its limit. Dragging fires `arc-input` continuously and `arc-change` when you let go. A key press fires both, and neither fires if the key leaves the range where it was. The detail carries `value` as `[low, high]`, plus `low` and `high` on their own. Each thumb stops at the other, so low never passes high.

Guidelines

Do

  • Give it a `label` unless something next to it already says what the range is
  • Use `arc-input` for live filtering and `arc-change` for saving or other expensive work
  • Match `step` to your data: 1 for integers, 0.01 for fine decimals
  • Give it at least 250px of width so both thumbs are easy to drag
  • Start `low` and `high` at the range most people want

Don't

  • Don't make `step` so small that the thumbs are hard to pull apart with a mouse
  • Don't use it for non-numeric choices. Use MultiSelect or a group of checkboxes

Features

  • Thumb `aria-label`s are the label plus "low" or "high", or "Range low" and "Range high" without a label
  • `min`, `max` and `step` props. Values snap to multiples of `step`
  • Hover and focus add a glow to the thumb
  • Disabled drops to 50% opacity and blocks pointer events

Preview

Usage

This component needs JavaScript. Use the Web Component or a framework wrapper.

<script type="module" src="@arclux/arc-ui"></script>

<!-- Basic price range filter -->
<arc-range-slider label="Price" low="20" high="80" min="0" max="200" step="5"></arc-range-slider>

<!-- Temperature comfort zone -->
<arc-range-slider label="Comfort Zone" low="18" high="24" min="10" max="40" step="0.5"></arc-range-slider>

<!-- Frequency band selector -->
<arc-range-slider label="Frequency (Hz)" low="200" high="4000" min="20" max="20000" step="10"></arc-range-slider>

<!-- Disabled state -->
<arc-range-slider label="Locked Range" low="30" high="70" disabled></arc-range-slider>

<!-- Without value display -->
<arc-range-slider label="Silent" low="10" high="90" show-values="false"></arc-range-slider>

<script>
  const rs = document.querySelector('arc-range-slider');

  // Real-time filtering while dragging
  rs.addEventListener('arc-input', (e) => {
    console.log('Filtering:', e.detail.low, '–', e.detail.high);
  });

  // Commit final range on release
  rs.addEventListener('arc-change', (e) => {
    console.log('Committed:', e.detail.low, '–', e.detail.high);
  });
</script>

API

maxnumber100
Maximum allowed value at the right edge of the track.
namestring''
disabledbooleanfalse
Disables interaction, reducing opacity and blocking pointer events.
labelstring''
Label text displayed above the slider with the range values shown on the right.
minnumber0
Minimum allowed value at the left edge of the track.
stepnumber1
Increment granularity. Values snap to multiples of this number.
lownumber0
Lower bound value of the selected range. Reflected as an attribute.
highnumber100
Upper bound value of the selected range. Reflected as an attribute.
showValuesbooleantrue
Whether to display the numeric "low – high" readout in the header.
size'sm' | 'md' | 'lg''md'
Control size. md is the default; sm and lg scale the track and thumbs.
formAssociatedbooleantrue
propertiesobject{ // flag(), unlike `disabled`. The exclusion in props.js is specifically // about form-associated *platform* semantics: a `disabled` content // attribute that is merely present makes the element actually disabled // per the HTML spec, and formDisabledCallback assigns the property back, // so no converter can win. Neither of these is platform-mapped: // `required` is enforced by _computeValidity() below and `readonly` by // each component's own interaction handlers, so the stock converter buys // nothing here and costs the usual bug: `required="false"` read as true, // blocking submission of a form the author meant to leave optional. // Finding #48's shape, across all 26 form controls at once. required: flag(false), readonly: flag(false), }
Lit merges static properties up the prototype chain, so every consumer gets these without declaring them. required participates in constraint validation below; readonly reflects for styling and is enforced by each component's interaction handlers (the mixin can't know which gestures mutate state).
autoValidatesbooleantrue
Components that run their own constraint-validation logic (pattern checks, range checks) opt out of the automatic required sync by overriding this to false, and own the whole validity flag set instead.
form
validity
validationMessage
requiredbooleanfalse
readonlybooleanfalse

Methods

checkValidity()boolean
Whether the control currently satisfies its constraints, per the native constraint-validation API. Fires invalid on the element when it does not, and reports nothing to the user.
reportValidity()boolean
As checkValidity(), but also shows the browser's validation message against the control when it fails.

Events

arc-inputdetail:{ value: [number, number], low: number, high: number }
Fired continuously as the user drags either thumb. Detail contains the canonical value as [low, high], plus low and high named separately. Use for real-time filtering or preview. Not fired when a key press leaves the range unchanged.
arc-changedetail:{ value: [number, number], low: number, high: number }
Fired once when the user releases a thumb, indicating the final committed range. Detail contains the canonical value as [low, high], plus low and high named separately. Use for persisting to a database or triggering an expensive operation. Not fired when a key press leaves the range unchanged.

See also