-
|
Hello! I can´t do the box-shadow appear in android I also tried the shorthand box-shadow: 10px 5px 5px black; but nothing At first I was having the "unknown property" error with all the "shadow-xxx" properties. I instaled the plugin for Typescript |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
looks like you're applying a box-shadow to a View component in React Native using styled-components, but box-shadow property is not supported in React Native. Try using the elevation property or if that doesnt work, you could checkout react-native-shadow lib 👍 |
Beta Was this translation helpful? Give feedback.
-
|
export const TabContainer = styled.View`
shadow-color: #000;
shadow-offset: 0px 2px;
shadow-opacity: 0.25;
shadow-radius: 3.84px;
elevation: 5;
`;This is a React Native platform limitation, not a styled-components issue. |
Beta Was this translation helpful? Give feedback.

box-shadowis not supported in React Native. React Native has its own shadow system:shadowColor,shadowOffset,shadowOpacity,shadowRadiuselevationThis is a React Native platform limitation, not a styled-components issue.
css-to-react-nativetranslates CSS property names to their RN equivalents, but the underlying platform must support them.