Text
Text component provides a simple element to avoid dealing with sizing in the React Native Text.
1
import { Text } from '../components/';
2
3
<Text component="h1">Default text</Text>
4
<Text component="h2">Default text</Text>
5
<Text component="h3">Default text</Text>
6
<Text component="h4">Default text</Text>
7
<Text component="h5">Default text</Text>
8
<Text component="h6">Default text</Text>
9
<Text component="s1">Default text</Text>
10
<Text component="s2">Default text</Text>
11
<Text component="p1">Default text</Text>
12
<Text component="p2">Default text</Text>
13
<Text component="c1">Default text</Text>
14
<Text component="c2">Default text</Text>
15
<Text component="label">Default text</Text>
Copied!

Properties

Name
Type
Description
children
ReactText | ReactElement<TextProps>
String or number to be rendered as text. Also can be ReactElement - nested Text component.
component
string
Can be h1, h2, h3, h4, h5, h6, s1, s2, p1, p2, c1, c2, label. Defaults to p1. Use h categories when needed to display headings. Use s categories when needed to display subtitles. Use p categories when needed to display regular text. Use c and label categories when needed to give user a hint on something.
...TextProps
TextProps
Any props applied to Text component.
Last modified 1yr ago
Copy link
Contents
Properties