Skip to content

Instantly share code, notes, and snippets.

@louicoder
Last active February 6, 2022 08:13
Show Gist options
  • Save louicoder/21215f8a6da9f79b7be9c182041b014e to your computer and use it in GitHub Desktop.
Save louicoder/21215f8a6da9f79b7be9c182041b014e to your computer and use it in GitHub Desktop.
React native box show Shadow properties
// Properties need to obtain a box shadow effect in React native
const shadow = {
elevation: 4,
shadowOffset: { width: 3, height: 5 },
shadowColor: '#ccc',
shadowOpacity: 0.2,
shadowRadius: 10
};
const shadow2 = {
shadowColor: '#171717',
shadowOffset: { width: -2, height: 4 },
shadowOpacity: 0.2,
shadowRadius: 3
};
// This is more preferable
const shadow3 = {
shadowColor: '#00000090',
shadowOffset: { width: 0, height: RFValue(3) },
shadowRadius: 8,
shadowOpacity: 0.2
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment