Skip to content

Slider component supports range select #5209

@hohoaisan

Description

@hohoaisan

Description

Please add support for ranged-slider for selecting between two values

Problem Statement

Currently Slider component only support one-sided and only one value per Slider, there're use cases that needs ranged slider like selecting between prices range, amount range,.. but it doesn't support.

Proposed Solution or API

Add option isRange: boolean to Slider component and accepts defaultValue/value as an array

const Example = () => {
  return
    <Box alignItems="center" w="100%">
      <Slider isRanged={true} w="3/4" maxW="300" low={0} high={70} minValue={0} maxValue={100} accessibilityLabel="hello world" step={10}>
        <Slider.Thumb />
        <Slider.Track>
          <Slider.FilledTrack />
        </Slider.Track>
        <Slider.Thumb />
      </Slider>
    </Box>;
};

Alternatives

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions