React Native Starter
2.0.0
2.0.0
  • Getting Started
  • Architecture
  • Testing
  • Internationalization
  • Adding Pages and Components
  • Components
    • Text
    • Icon
    • Card
    • List
    • Top Navigation
    • Top Tabs
    • Bottom Tabs
    • Menu
    • Button
    • Checkbox
    • Toggle
    • Input
  • Screens
  • Theming
Powered by GitBook
On this page
  1. Components

Text

PreviousComponentsNextIcon

Last updated 4 years ago

Text component provides a simple element to avoid dealing with sizing in the React Native Text.

import { Text } from '../components/';

<Text component="h1">Default text</Text>
<Text component="h2">Default text</Text>
<Text component="h3">Default text</Text>
<Text component="h4">Default text</Text>
<Text component="h5">Default text</Text>
<Text component="h6">Default text</Text>
<Text component="s1">Default text</Text>
<Text component="s2">Default text</Text>
<Text component="p1">Default text</Text>
<Text component="p2">Default text</Text>
<Text component="c1">Default text</Text>
<Text component="c2">Default text</Text>
<Text component="label">Default text</Text>

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.