Typography
- Typography is for text writing including title, subtitle, text and paragraph.
- This component makes it easy to apply a default set of font weights, sizes and colors in your application.
Examples
Typography.Title
There are 2 typefaces: neutral and playful:
neutralsupports 6 levels of a Title:h1,h2,h3,h4,h5,h6playfulsupports 5 levels of a Title:h1,h2,h3,h4,h5
Neutral typeface
Playful typeface
Typography.Body
There are 2 typefaces: neutral and playful:
neutral: Body, Body Bold, Body small and Body small boldplayfulBody and Body Bold
Neutral typeface
Playful typeface
Typography.Caption
This is a multipurpose type style that can be used for tertiary information. It can also be used for explanatory helper text that appears below a input field within a component. It should not be used for body copy.
Typography.Label
This is a multipurpose type style that can be used for chips, labels and captions. It should not be used for body copy.
Intents
All Typography components come with 11 intents: body, subdued, primary, secondary, success, info, warning, danger, inverted, archived and disabled.
Props
Typography.Title
Prop | Required | Default | Type | |
|---|---|---|---|---|
children | required | ReactNode | ||
intent | body | "warning" | "success" | "info" | "primary" | "danger" | "archived" | "secondary" | "disabled" | "body" | "subdued" | "inverted" | ||
level | h1 | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | ||
style | StyleProp<TextStyle> | |||
testID | string | |||
typeface | neutral | "neutral" | "playful" |
Typography.Body
Prop | Required | Default | Type | |
|---|---|---|---|---|
children | required | ReactNode | ||
intent | body | "warning" | "success" | "info" | "primary" | "danger" | "archived" | "secondary" | "disabled" | "body" | "subdued" | "inverted" | ||
style | StyleProp<TextStyle> | |||
testID | string | |||
typeface | neutral | "neutral" | "playful" | ||
variant | regular | "small" | "regular" | "regular-bold" | "small-bold" |
Typography.Caption
Prop | Required | Default | Type | |
|---|---|---|---|---|
children | required | ReactNode | ||
fontWeight | regular | "regular" | "semi-bold" | ||
intent | body | "warning" | "success" | "info" | "primary" | "danger" | "archived" | "secondary" | "disabled" | "body" | "subdued" | "inverted" | ||
style | StyleProp<TextStyle> | |||
testID | string |
Typography.Label
Prop | Required | Default | Type | |
|---|---|---|---|---|
children | required | ReactNode | ||
intent | body | "warning" | "success" | "info" | "primary" | "danger" | "archived" | "secondary" | "disabled" | "body" | "subdued" | "inverted" | ||
style | StyleProp<TextStyle> | |||
testID | string |