Skip to content

feat(react-range-slider): introduce RangeSlider component#35751

Open
soniaboller wants to merge 7 commits intomicrosoft:react-range-sliderfrom
soniaboller:feat/react-ranger-slider-preview
Open

feat(react-range-slider): introduce RangeSlider component#35751
soniaboller wants to merge 7 commits intomicrosoft:react-range-sliderfrom
soniaboller:feat/react-ranger-slider-preview

Conversation

@soniaboller
Copy link

Previous Behavior

New Behavior

Related Issue(s)

  • Fixes #

@github-actions
Copy link

Pull request demo site: URL

@soniaboller soniaboller marked this pull request as ready for review February 19, 2026 00:50
@soniaboller soniaboller requested review from a team and dmytrokirpa as code owners February 19, 2026 00:50
@Hotell Hotell requested a review from mainframev February 19, 2026 13:04
Copy link
Contributor

@mainframev mainframev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the thumbs overlap, the start thumb is always the active one - even if the user most recently interacted with the end thumb. Can we add a ref to track the last-used thumb, so when they overlap the correct thumb becomes active?

Screen.Recording.2026-03-02.at.14.47.15.mov

rangeSliderStepsPercentVar,
} = rangeSliderCSSVars;

const getPercent = (value: number, min: number, max: number) => (max === min ? 0 : ((value - min) / (max - min)) * 100);
Copy link
Contributor

@mainframev mainframev Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should consider moving getPercent into the react-utilities package so we can reuse it across components instead of duplicating the logic. It’s currently implemented twice here, and the same calculation also exists in AlphaSlider in react-color-picker. Centralizing it in utilities would let Slider and RangeSlider import a single shared implementation.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that makes sense! Do you want me to add it to the react-utilities package and just update it's usage in RangeSlider? Or make the change in Slider and AlphaSlider as well?

…st for initial state, input focus for touch, pointer events fix, story import updates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants