Skip to content

Instantly share code, notes, and snippets.

@tronghieu60s
Last active June 17, 2024 07:42
Show Gist options
  • Save tronghieu60s/0d750ac3cef9643d5286a79648a1c9ea to your computer and use it in GitHub Desktop.
Save tronghieu60s/0d750ac3cef9643d5286a79648a1c9ea to your computer and use it in GitHub Desktop.
// https://ethercreative.github.io/react-native-shadow-generator/
export const shadowsStyle = {
1: {
elevation: 1,
shadowColor: "#000",
shadowOffset: { width: 0, height: 1 },
shadowOpacity: 0.18,
shadowRadius: 1.0,
},
2: {
elevation: 2,
shadowColor: "#000",
shadowOffset: { width: 0, height: 1 },
shadowOpacity: 0.2,
shadowRadius: 1.41,
},
3: {
elevation: 3,
shadowColor: "#000",
shadowOffset: { width: 0, height: 1 },
shadowOpacity: 0.22,
shadowRadius: 2.22,
},
4: {
elevation: 4,
shadowColor: "#000",
shadowOffset: { width: 0, height: 2 },
shadowOpacity: 0.23,
shadowRadius: 2.62,
},
5: {
elevation: 5,
shadowColor: "#000",
shadowOffset: { width: 0, height: 2 },
shadowOpacity: 0.25,
shadowRadius: 3.84,
},
6: {
elevation: 6,
shadowColor: "#000",
shadowOffset: { width: 0, height: 3 },
shadowOpacity: 0.27,
shadowRadius: 4.65,
},
7: {
elevation: 7,
shadowColor: "#000",
shadowOffset: {
width: 0,
height: 3,
},
shadowOpacity: 0.29,
shadowRadius: 4.65,
},
8: {
elevation: 8,
shadowColor: "#000",
shadowOffset: {
width: 0,
height: 4,
},
shadowOpacity: 0.3,
shadowRadius: 4.65,
},
9: {
elevation: 9,
shadowColor: "#000",
shadowOffset: {
width: 0,
height: 4,
},
shadowOpacity: 0.32,
shadowRadius: 5.46,
},
10: {
elevation: 10,
shadowColor: "#000",
shadowOffset: {
width: 0,
height: 5,
},
shadowOpacity: 0.34,
shadowRadius: 6.27,
},
11: {
elevation: 11,
shadowColor: "#000",
shadowOffset: {
width: 0,
height: 5,
},
shadowOpacity: 0.36,
shadowRadius: 6.68,
},
12: {
elevation: 12,
shadowColor: "#000",
shadowOffset: {
width: 0,
height: 6,
},
shadowOpacity: 0.37,
shadowRadius: 7.49,
},
13: {
elevation: 13,
shadowColor: "#000",
shadowOffset: {
width: 0,
height: 6,
},
shadowOpacity: 0.39,
shadowRadius: 8.3,
},
14: {
elevation: 14,
shadowColor: "#000",
shadowOffset: {
width: 0,
height: 7,
},
shadowOpacity: 0.41,
shadowRadius: 9.11,
},
15: {
elevation: 15,
shadowColor: "#000",
shadowOffset: {
width: 0,
height: 7,
},
shadowOpacity: 0.43,
shadowRadius: 9.51,
},
16: {
elevation: 16,
shadowColor: "#000",
shadowOffset: {
width: 0,
height: 8,
},
shadowOpacity: 0.44,
shadowRadius: 10.32,
},
17: {
elevation: 17,
shadowColor: "#000",
shadowOffset: {
width: 0,
height: 8,
},
shadowOpacity: 0.46,
shadowRadius: 11.14,
},
18: {
elevation: 18,
shadowColor: "#000",
shadowOffset: {
width: 0,
height: 9,
},
shadowOpacity: 0.48,
shadowRadius: 11.95,
},
19: {
elevation: 19,
shadowColor: "#000",
shadowOffset: {
width: 0,
height: 9,
},
shadowOpacity: 0.5,
shadowRadius: 12.35,
},
20: {
elevation: 20,
shadowColor: "#000",
shadowOffset: {
width: 0,
height: 10,
},
shadowOpacity: 0.51,
shadowRadius: 13.16,
},
21: {
elevation: 21,
shadowColor: "#000",
shadowOffset: {
width: 0,
height: 10,
},
shadowOpacity: 0.53,
shadowRadius: 13.97,
},
22: {
elevation: 22,
shadowColor: "#000",
shadowOffset: {
width: 0,
height: 11,
},
shadowOpacity: 0.55,
shadowRadius: 14.78,
},
23: {
elevation: 23,
shadowColor: "#000",
shadowOffset: {
width: 0,
height: 11,
},
shadowOpacity: 0.57,
shadowRadius: 15.19,
},
24: {
elevation: 24,
shadowColor: "#000",
shadowOffset: {
width: 0,
height: 12,
},
shadowOpacity: 0.58,
shadowRadius: 16.0,
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment