- JavaScript
- TypeScript
Reference
There are 3 sets of shadow APIs in React Native:boxShadow: A View style prop and a spec-compliant implementation of the web style prop of the same name.dropShadow: A specific filter function available as part of thefilterView style prop.- Various
shadowprops (shadowColor,shadowOffset,shadowOpacity,shadowRadius): These map directly to their native counterparts exposed by the platform-level APIs.
dropShadow and boxShadow are as follows:
dropShadowexists as part offilter, whereasboxShadowis a standalone style prop.dropShadowis an alpha mask, so only pixels with a positive alpha value will “cast” a shadow.boxShadowwill cast around the border box of the element no matter it’s contents (unless it is inset).dropShadowis only available on Android,boxShadowis available on iOS and Android.dropShadowcannot be inset likeboxShadow.dropShadowdoes not have thespreadDistanceargument likeboxShadow.
boxShadow and dropShadow are generally more capable than the shadow props. The shadow props, however, map to native platform-level APIs, so if you only need a straightforward shadow these props are recommended. Note that only shadowColor works on Android, iOS and Vega, all other shadow props work on iOS and Vega.
Props
boxShadow Vega Not Available
See View Style Props for documentation.
dropShadow Android Vega Not Available
See View Style Props for documentation.
shadowColor
Sets the drop shadow color.
This property will only work on Android API 28 and above. For similar functionality on lower Android APIs, use the elevation property.

