Typography
Defines typography presets and allows creation of custom typographies.
Values
Values |
Font Size |
Font Weight |
Line Height |
text10 |
64 |
100 |
|
text20 |
50 |
100 |
|
text30 |
36 |
100 (Android)/200 (iOS) |
|
text40 |
28 |
300 |
|
text50 |
24 (Android)/22(iOS) |
300 |
|
text60 |
20 |
300 |
|
text70 |
16 (Android)/17 (iOS) |
300 |
|
text80 |
14 (Android)/15 (iOS) |
300 |
|
text90 |
12 (Android)/13 (iOS) |
300 |
|
text100 |
10 (Android)/11 (iOS) |
300 |
Methods
Methods |
Description |
Arguments |
loadTypographies |
Load custom set of typographies. |
typographies - map of keys and typography values |
Usage
loadTypographies
import {Typography, Text} from 'react-native-ui-lib';
Typography.loadTypographies({
h1: {fontSize: 58, fontWeight: '300', lineHeight: 80},
h2: {fontSize: 46, fontWeight: '300', lineHeight: 64},
});
<Text h1>Hello World</Text>