Open snapsnapturtle opened 3 years ago
@rafael-sepeda can you check on the existing designs to see if they're updated and add the figma link please?
@snapsnapturtle Fun fact: I just asked (reminded, to be honest _) or designers about the existing use cases for this exact component. Because we do not have a proper component in Wave, but in design someone in the past documented this component with many different states (and I have a gut feeling that we do not need most of them).
So let's do that together!
Describe the feature you'd like
Add a new Slider component, which can be used to select a number (or range) between two ranges. We're already using a custom implementation in one of our tools to define the radius of a pickup/dropoff location in meters.
We want to implement the new Slider component according to the designs from https://www.figma.com/file/dTefUItBx5bfbxcCcMzMXm/branch/q5wyukQyaXOZCZCM3BOUn1/Wave-DS?node-id=1702%3A49770 and already have an idea of how the API of the component could look like.
API
Below you can find an idea for which props should be supported by the component to make it work for all our use cases.
Other Information
I was already looking at some possible libraries that can make our lives a bit easier and this one feels pretty solid in terms of performance: https://github.com/zillow/react-slider. Another implementation which probably has a better code in terms of React we have the base web version here, but it's not very fast https://baseweb.design/components/slider/. We might also want to implement our own solution.