Skip to content
Discussion options

You must be logged in to vote

box-shadow is not supported in React Native. React Native has its own shadow system:

  • iOS: Use shadowColor, shadowOffset, shadowOpacity, shadowRadius
  • Android: Use elevation
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. css-to-react-native translates CSS property names to their RN equivalents, but the underlying platform must support them.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by quantizor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants