You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ripple effect is a visual feedback that occurs when a user interacts with a pressable UI element, such as a button. This response takes the form of a circular ripple expanding from the point of contact, much like a drop falling into water and creating ripples.
6
+
7
+
The ripple effect is an essential aspect of Material Design, and Paper's pressable components have it enabled by default. Nonetheless, it can be tailored to suit specific needs.
8
+
9
+
:::note
10
+
The ripple effect on the iOS platform is replaced by a highlight effect.
11
+
:::
12
+
13
+
## Customize ripple effect color in component
14
+
15
+
The `rippleColor` prop is available for every pressable component which allows you to set the color of the ripple effect. For the instance, to make the `Button` component's ripple effect transparent, simply pass the desired color value to the prop:
16
+
17
+
```
18
+
<Button
19
+
rippleColor="#FF000020"
20
+
icon="camera"
21
+
mode="contained"
22
+
onPress={() => console.log('Pressed')}>
23
+
Press me
24
+
</Button>
25
+
```
26
+
27
+
## Disable ripple effect in all components
28
+
29
+
To disable the ripple effect in **all** of Paper's components set `rippleEffectEnabled: false` on the `settings` prop of `PaperProvider`.
30
+
31
+
```
32
+
import { Provider as PaperProvider } from 'react-native-paper';
0 commit comments