Range Group
A compact multi-range filter. One toggle summarises several numeric range filters inline
(Age / Salary / Children) and expands into a floating panel with one slider per
dimension — instead of spreading three separate sliders across a filter bar. Each row is
dual-thumb (min–max) or single-thumb (a ≥ / ≤ threshold),
configured per-row via data attributes.
In a filter bar
The range group drops into a .pa-filter-card__filters row as a
single control standing in for three sliders. Open it, drag, and Apply.
Emitted values
The group dispatches pa-range-group:change live and
pa-range-group:apply / :reset on the buttons. Payload is keyed by
data-key; a bound at its extent reports null (i.e. “Any”).
// interact with the filter above…
Single-thumb thresholds
Set data-mode="single" for a one-handle threshold. data-bound="gte"
reads as “value+”, data-bound="lte" as “≤ value”.
Handle shapes
Add a pa-range--handle-* modifier to any .pa-range row to restyle its
handles. Purely cosmetic (no JS), so you can mix shapes per row. Open the filter to compare —
circle (default), rect, bar, arrow, and
needle (a downward triangle balancing its point on the track).
handle-rect
handle-bar
handle-arrow
handle-needle
Ticks & click-to-seek
Add data-ticks (major interval) and optionally data-ticks-minor to draw
tick marks along the track; add data-tick-labels to print the major values beneath.
Marks sit behind the track so only their ends show — major ticks reach further out than minor.
On every row (with or without ticks) the track is click-to-seek: press anywhere
off the handles and the nearest thumb jumps there and keeps following the pointer. Add
data-snap-ticks to make the thumbs settle on the nearest tick instead of the
(possibly finer) data-step grid — drag the Level row and it snaps to 0, 10, 20…
ticks=10 minor=5 labels
ticks=25
ticks=10 snap-ticks
single + labels
<div class="pa-range" data-range data-key="age"
data-min="0" data-max="80"
data-ticks="20" data-ticks-minor="10" data-tick-labels>
Theming with --pa-range-* tokens
Every colour and key dimension is a runtime token that falls back to the shared cascade, so a
theme or a per-instance style can retint/resize a slider with no recompile.
This group overrides the fill, thumb, track thickness, and handle size — set on the
__panel (it reparents to <body> when open, so tokens on the
group root wouldn't reach the sliders).
<div class="pa-range-group__panel" data-range-group-panel
style="--pa-range-fill: #8b5cf6;
--pa-range-thumb-border: #8b5cf6;
--pa-range-track-height: 0.8rem;
--pa-range-thumb-size: 2rem;">
Markup
One [data-range] row per dimension. Positioning is driven in 0–100% via CSS custom
properties on logical inset properties, so RTL mirrors automatically.
<div class="pa-range-group" data-range-group>
<button class="pa-range-group__toggle" data-range-group-toggle aria-expanded="false">
<!-- range-group.js fills this with "LABEL value / …" segments -->
<span class="pa-range-group__summary" data-range-group-summary></span>
<i class="fas fa-chevron-down pa-range-group__caret"></i>
</button>
<div class="pa-range-group__panel" data-range-group-panel>
<div class="pa-range-group__row">
<div class="pa-range-group__row-head">
<span class="pa-range-group__row-label">Age</span>
<span class="pa-range-group__row-value" data-range-output></span>
</div>
<div class="pa-range" data-range
data-key="age" data-min="18" data-max="80"
data-value-min="25" data-value-max="60">
<div class="pa-range__rail">
<div class="pa-range__track"></div>
<div class="pa-range__fill" data-range-fill></div>
<button class="pa-range__thumb pa-range__thumb--min" data-range-thumb="min"></button>
<button class="pa-range__thumb pa-range__thumb--max" data-range-thumb="max"></button>
</div>
</div>
</div>
<!-- …more rows… -->
<div class="pa-range-group__actions">
<button class="pa-btn pa-btn--sm pa-btn--ghost" data-range-group-reset>Reset</button>
<button class="pa-btn pa-btn--sm pa-btn--primary" data-range-group-apply>Apply</button>
</div>
</div>
</div>
CSS Classes Reference
Compact control
pa-range-group- Root wrapper (toggle + floating panel)pa-range-group__toggle- The button summarising the filterspa-range-group__summary- Single-line "LABEL value / …" readout hostpa-range-group__seg-label- A dimension's label in the summarypa-range-group__seg-value- A dimension's value in the summarypa-range-group__seg-value--empty- Muted "Any" valuepa-range-group__seg-sep- The " / " separatorpa-range-group__caret- Dropdown chevron (rotates when open)pa-range-group--open- State: panel open (on the root)
Floating panel
pa-range-group__panel- The floating panel (reparented to body when open)pa-range-group__panel--open- State: shownpa-range-group__row- One dimension (head + slider)pa-range-group__row-head- Row label + value linepa-range-group__row-label- Row labelpa-range-group__row-value- Row value readoutpa-range-group__row-value--empty- Muted "Any" readoutpa-range-group__actions- Reset / Apply footer
Slider primitive
pa-range- Slider (dual-thumb by default)pa-range__rail- Inner rail the thumbs travel alongpa-range__track- Full trackpa-range__fill- Selected-range fillpa-range__thumb- A handlepa-range__thumb--min/--max- Low / high handlepa-range--single- Single-thumb (threshold) modepa-range--disabled- Non-interactive state
Handle shapes
pa-range--handle-rect- Rounded rectangle handlespa-range--handle-bar- Thin vertical bar handlespa-range--handle-arrow- Chevron handlespa-range--handle-needle- Downward-triangle "needle" handles
Tick marks
pa-range__ticks- Tick container (built by JS fromdata-ticks)pa-range__tick- A minor tick markpa-range__tick--major- A major tick mark (longer)pa-range__tick-labels- Container for the value labelspa-range__tick-label- A single major-tick labelpa-range--ticks-labeled- Row modifier reserving the label band
Data attributes
data-range-group- Marks a root for auto-initdata-range-group-toggle/-panel/-summary- Wiring hooksdata-range-group-reset/-apply- Footer buttonsdata-range- A slider row;data-key/data-labelidentify itdata-min/data-max/data-step- Boundsdata-mode="single"+data-bound="gte|lte"- Threshold modedata-value/data-value-min/data-value-max- Initial valuesdata-prefix/data-suffix/data-thousands- Number formattingdata-ticks/data-ticks-minor/data-tick-labels- Tick marks & labelsdata-snap-ticks- Snap thumbs to the nearest tick (not the step grid)data-range-thumb="min|max"/data-range-fill/data-range-output- Element hooks
Theming tokens (CSS variables)
--pa-range-track/-fill- Track / fill colour--pa-range-thumb-bg/-thumb-border/-thumb-border-hover- Handle colours--pa-range-focus-ring- Thumb focus / active ring--pa-range-tick/-tick-major- Minor / major tick colour--pa-range-track-height/-thumb-size- Structural sizes--pa-range-group-panel-min-width- Floating panel width