Skip to content

[Android] Fix borderless ripple animation#4025

Open
j-piasecki wants to merge 3 commits intomainfrom
@jpiasecki/fix-borderless-ripple-animation
Open

[Android] Fix borderless ripple animation#4025
j-piasecki wants to merge 3 commits intomainfrom
@jpiasecki/fix-borderless-ripple-animation

Conversation

@j-piasecki
Copy link
Member

Description

Borderless ripple animation is currently broken due to being clipped by the wrapper view. This PR removes clipping for borderless buttons.

Test plan

Checked different variations of this
import React from 'react';
import { StyleSheet, Text } from 'react-native';
import {
  BorderlessButton,
  GestureHandlerRootView,
  RectButton,
} from 'react-native-gesture-handler';

export default function EmptyExample() {
  return (
    <GestureHandlerRootView style={styles.container}>
      <BorderlessButton
        borderless
        foreground
        style={{
          padding: 20,
          backgroundColor: 'red',
          borderRadius: 16,
          transform: [
            { translateX: -50 },
            { translateY: -50 },
            { rotate: '45deg' },
          ],
        }}
        onPress={() => {
          console.log('pressed');
        }}>
        <Text>Press me</Text>
      </BorderlessButton>

      <RectButton
        style={{ padding: 20, backgroundColor: 'yellow', borderRadius: 16 }}>
        <Text>Press me</Text>
      </RectButton>
    </GestureHandlerRootView>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
  },
});

Copilot AI review requested due to automatic review settings March 13, 2026 12:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes Android borderless ripple animations being clipped by the button wrapper by avoiding overflow: hidden clipping when a button is configured as borderless. This aligns runtime behavior with the documented intent of borderless (“render outside the view bounds”).

Changes:

  • Stop applying wrapper overflow: 'hidden' styling when borderless is true.
  • Plumb borderless explicitly into the native RNGestureHandlerButton component props.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Successfully merging this pull request may close these issues.

2 participants