Text
A list of text styles that can be used within the app.
Coonsume them using the Text
component.
Text component
A wrapper of React Native's text component, with the addition of a 'token' prop.
The token prop specifies what text style token should be applied to the text (see core/text
to view a list of styles).
import { Text } from "reckon-mobile-design-system";export const Screen = () => (<Text color={colors.text.default} token="title-2">Welcome</Text>;)
Props
align
"left" │ "auto" │ "right" │ "center" │ "justify"
"auto"
color
string
numberOfLines
number
token
enum
"3x-400"
Available tokens
Token | Preview | Font size | x4 multiplier |
---|---|---|---|
title-1 | title-1 | 16 | 4x |
title-2 | title-2 | 24 | 6x |
blockTitle-1 | blockTitle-1 | 12 | 3x |
2.5x-400 | 2.5x-400 | 10 | 2.5x |
2.5x-500 | 2.5x-500 | 10 | 2.5x |
2.5x-700 | 2.5x-700 | 10 | 2.5x |
3x-400 | 3x-400 | 12 | 3x |
3x-500 | 3x-500 | 12 | 3x |
3x-700 | 3x-700 | 12 | 3x |
3.5x-400 | 3.5x-400 | 14 | 3.5x |
3.5x-500 | 3.5x-500 | 14 | 3.5x |
3.5x-700 | 3.5x-700 | 14 | 3.5x |
4x-400 | 4x-400 | 16 | 4x |
4x-500 | 4x-500 | 16 | 4x |
4x-700 | 4x-700 | 16 | 4x |
4.5x-400 | 4.5x-400 | 18 | 4.5x |
4.5x-500 | 4.5x-500 | 18 | 4.5x |
4.5x-700 | 4.5x-700 | 18 | 4.5x |
2.5x-400-p | 2.5x-400-p | 10 | 2.5x |
2.5x-500-p | 2.5x-500-p | 10 | 2.5x |
2.5x-700-p | 2.5x-700-p | 10 | 2.5x |
3x-400-p | 3x-400-p | 12 | 3x |
3x-500-p | 3x-500-p | 12 | 3x |
3x-700-p | 3x-700-p | 12 | 3x |
3.5x-400-p | 3.5x-400-p | 14 | 3.5x |
3.5x-500-p | 3.5x-500-p | 14 | 3.5x |
3.5x-700-p | 3.5x-700-p | 14 | 3.5x |
4x-400-p | 4x-400-p | 16 | 4x |
4x-500-p | 4x-500-p | 16 | 4x |
4x-700-p | 4x-700-p | 16 | 4x |
4.5x-400-p | 4.5x-400-p | 18 | 4.5x |
4.5x-500-p | 4.5x-500-p | 18 | 4.5x |
4.5x-700-p | 4.5x-700-p | 18 | 4.5x |
7x-700-p | 7x-700-p | 28 | 7x |