react-native-paper icon indicating copy to clipboard operation
react-native-paper copied to clipboard

Custom shadows definition for Surface component

Open adorum opened this issue 9 months ago • 3 comments

Is it possible to override shadow definitions for Surface elevations 1-5 globally so that each component from react-native-paper which uses Surface will user my custom shadows?

adorum avatar Feb 27 '25 15:02 adorum

Hey @adorum, as far as I remember you can only customize the color, by specifying your own colors in theme.colors.elevation

lukewalczak avatar Apr 25 '25 11:04 lukewalczak

The default shadows are simply terrible. :) Especially on iOS. It's a matter of taste, but they look so, so off on iOS. It would be amazing to be able to override them.

RohovDmytro avatar Jun 22 '25 16:06 RohovDmytro

colors.elevation only overrides the surface colour, not the shadow colour. By default a surface is tinted based on your primary colour dependant upon the elevation level.

There is no way to override the shadow colour itself, since it's hardcoded as #000 which I don't think can be dynamically changed.

raldred avatar Aug 21 '25 17:08 raldred