react-native-slider icon indicating copy to clipboard operation
react-native-slider copied to clipboard

Vertical Slider

Open CHaNGeTe opened this issue 7 years ago • 12 comments

Describe the Feature

Same slider but for vertical orientation Is it supported?

CHaNGeTe avatar May 12 '19 08:05 CHaNGeTe

You can probably rotate view with your styles tho.

<Slider style={{ transform: [{ rotate: '90deg' }] }} />

Let me know if it doesn't work, I'll be glad to reopen that.

michalchudziak avatar May 13 '19 10:05 michalchudziak

@CHaNGeTe did you have any luck? I tried this but the sliding on Android is odd ... it's hard to get it to move and when it does it often moves in the opposite direction of the gesture.

blakeperdue avatar Jun 10 '19 23:06 blakeperdue

Nope, I am considering using https://www.npmjs.com/package/rn-vertical-slider for the vertical one

CHaNGeTe avatar Jun 12 '19 16:06 CHaNGeTe

We got it working with:

transform: [ { rotate: "-90deg" } ]

Note the negative 90 degrees. That helps slide things up and down in the correct direction.

vertical slider

joshuapinter avatar Aug 03 '19 14:08 joshuapinter

I want multiple vertical sliders side by side with steps. Also, want to change the thumb with a different image. Using this library, if you rotate the slider, it keeps the width and height size same as before and so it doesn't work if you want multiple sliders in a row. Please provide any solution.

dhruvalpatel18 avatar Aug 09 '19 20:08 dhruvalpatel18

Meanwhile there is a nice tutorial here to make a vertical slider.

smartcris avatar Aug 14 '19 21:08 smartcris

I am not able to set height and width of slider. It is still behaving as horizontal slider in styles

YajanaRao avatar Jun 01 '20 13:06 YajanaRao

Link to snack reproducible code: https://snack.expo.io/@yajana/slider

YajanaRao avatar Jun 18 '20 19:06 YajanaRao

I had to use React Native Elements Slider with orientation= vertical

YajanaRao avatar Aug 02 '20 13:08 YajanaRao

orientation= vertical

Hi. Could you specify how you get vertical slider from React Native Elements Slider? My code is `<View style={{ flex: 1 }}

    <Slider
      orientation="vertical"
      trackStyle={{ height: 10, backgroundColor: "lightgrey" }}
      thumbStyle={{ height: 40, width: 40, backgroundColor: "red" }}
    />

`

But my slider is still horizontal

karpov-denys avatar Sep 28 '20 12:09 karpov-denys

Still not able to allign the slider vertically, any luck anybody?

tiwari-ashwani avatar Apr 20 '21 10:04 tiwari-ashwani

Nope, I am considering using https://www.npmjs.com/package/rn-vertical-slider for the vertical one

This worked for me too. 👍👍👍

aswin-clear avatar Jul 30 '24 10:07 aswin-clear