Skip to content

Commit

Permalink
Use position absolute on range slider indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
mj12albert committed Dec 19, 2024
1 parent 2bfbabb commit 0ba1f52
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/react/src/slider/indicator/useSliderIndicator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ import type { useSliderRoot } from '../root/useSliderRoot';
function getRangeStyles(orientation: useSliderRoot.Orientation, offset: number, leap: number) {
if (orientation === 'vertical') {
return {
position: 'absolute',
bottom: `${offset}%`,
height: `${leap}%`,
width: 'inherit',
};
}

return {
position: 'absolute',
insetInlineStart: `${offset}%`,
width: `${leap}%`,
height: 'inherit',
Expand Down

0 comments on commit 0ba1f52

Please sign in to comment.