Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Border radius for ends of slider but not for 'active' section? #178

Open
jameschetwood opened this issue Apr 7, 2020 · 0 comments
Open

Comments

@jameschetwood
Copy link

jameschetwood commented Apr 7, 2020

I need the Thumb to be the same height as the Track, and for the edges of the slider to have a border radius. However when I apply these styles you can see the border radius of the 'active' part of the slider behind the Thumb.

<Slider
  style={styles.slider}
  trackStyle={styles.trackStyle}
  thumbStyle={styles.thumbStyle}
/>

const styles = StyleSheet.create({
  slider: {
    borderRadius: 12,
  },
  trackStyle: {
    height: 24,
    borderRadius: 12,
  },
  thumbStyle: {
    height: 24,
    width: 24,
    backgroundColor: "white",
    borderRadius: 12,
  },
});

Currently it looks like this:

Screenshot 2020-04-07 at 12 51 58

But I need this (excuse the low quality image):

flat

Can this be done?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant