question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Button ripple effect overflows outside button container Even without borderRadius

See original GitHub issue

Explain what you did I wrote a simple button with react-native-element . <Button onPress={() => this.login()} title='login' containerStyle={styles.buttonContainer} />

Expected behaviour I expected ripple not to be borderless.

Describe the bug ripple is borderless.

To Reproduce

Example:

https://snack.expo.io/@ali.assar/button-problem

Steps

1. Click on 'Button'

2. See the overlay

Possible Solution In line 65 of Button.js maybe changing the bloolean from true to false (borderless property) can fix it.

if (Platform.Version >= 21) { attributes.background = TouchableNativeFeedback.Ripple( 'ThemeAttrAndroid', true ); } ----------------------------------->>>>>>>> if (Platform.Version >= 21) { attributes.background = TouchableNativeFeedback.Ripple( 'ThemeAttrAndroid', false ); }

Screenshots

untitled

My Environment

| software | version | | react-native-elements | 1.0.0| | react-native | 0.58 | | yarn | 1.13.0|

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9

github_iconTop GitHub Comments

3reactions
koaladltcommented, Jun 18, 2021

I had a similar issue. My mistake was to use margin on “buttonStyle” prop. Using it on “containerStyle” fixed the problem.

1reaction
mdovncommented, Aug 16, 2021

I had a similar issue. My mistake was to use margin on “buttonStyle” prop. Using it on “containerStyle” fixed the problem.

Save my day, thanks @koaladlt

Read more comments on GitHub >

github_iconTop Results From Across the Web

The ripple effect keeps on going over the rounded corners ...
I'm trying to make material buttons with ripple effects in CSS, HTML, and JS, but the ripple effect keeps on going over the...
Read more >
How to Recreate the Ripple Effect of Material Design Buttons
To make our ripples circular, we've set the border-radius to 50%. And to ensure each ripple emerges from nothing, we've set the default...
Read more >
HOW TO: create the ripple effect from Material Design
Think what we need to do with our script. Add the ripple container to our buttons. Upon mousedown, add spans with the correct...
Read more >
CSS Techniques for Material Ripple Effect - PhoenixDX
The container button needs to have overflow: hidden so that the circle never overflows outside of the button's surface, and position: relative to...
Read more >
Let It Ripple - Rohan Faiyaz Khan
The overflow: hidden property prevents the ripple from rippling out of the container. The ripple is a circie ( border-radius: 100% ) which...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found