Created
July 14, 2016 13:42
-
-
Save knowbody/c5cdf26073b874eae86ba96e7cf3a540 to your computer and use it in GitHub Desktop.
React Native Font Weight Cheatsheet iOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ fontWeight: '100' }, // Thin | |
{ fontWeight: '200' }, // Ultra Light | |
{ fontWeight: '300' }, // Light | |
{ fontWeight: '400' }, // Regular | |
{ fontWeight: '500' }, // Medium | |
{ fontWeight: '600' }, // Semibold | |
{ fontWeight: '700' }, // Bold | |
{ fontWeight: '800' }, // Heavy | |
{ fontWeight: '900' }, // Black |
Aaaah. Zen ...
thanks
Awesome!
💯
Thanks mate, helped a lot.
It helps a lot! Thanks!
export const fontWeights = {
Thin: 100,
UltraLight: 200,
Light: 300,
Regular: 400,
Medium: 500,
Semibold: 600,
Bold: 700,
Heavy: 800,
Black: 900
};
@tonypee: for usage in StyleSheet i needed to change this to
export const fontWeight = {
Thin: "100",
UltraLight: "200",
Light: "300",
Regular: "400",
Medium: "500",
Semibold: "600",
Bold: "700",
Heavy: "800",
Black: "900"
};
Sorry but 100 to 400 is not working and 500 is working like 'bold' property. Did you notice this thing?
You can use https://www.npmjs.com/package/react-native-cross-platform-text to consolidate iOS and Android font weights into the same API
WOW thanks for this.
Nice! Thanks so much
Font weight in react native with example
https://infinitbility.com/react-native/font-weight-in-react-native
Thank you very much legend!!!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nice!