The slider works but in LTR on RTL forced apps. It would be great to support RTL.
try this:
import { I18nManager } from 'react-native';
const styles = StyleSheet.create({
ttb: { transform: [{ rotate: '90deg' }] },
btt: { transform: [{ rotate: '-90deg' }] },
rtl: { transform: [{ scale: -1 }] },
auto: I18nManager.isRTL ? { transform: [{ scale: -1 }] } : {},
sliderContainer: {
flex: 1,
justifyContent: "center"
},
});
<View style={[styles.auto, styles.sliderContainer]}><Slider /></View>
If you'd like to have this functionality supported out of the box, please consider sending a PR. As for now, you can use this workaround:
import { I18nManager } from 'react-native';
...
<Slider inverted={I18nManager.isRTL} />
The inverted prop didn't work for me.
I added style={{direction:"ltr"}} to the Slider component but ot works only for ios.
Most helpful comment
If you'd like to have this functionality supported out of the box, please consider sending a PR. As for now, you can use this workaround: