Text
Text displays words and characters of various sizes.
Import
import { Text } from '@nomada-sh/react-native-eyecandy';
Example
Props
Text Props
Inherits Text Props.
weight
Font weight of the text.
Possible values:
'semibold'
uses a font weight of700
.'medium'
uses a font weight of'normal'
.'regular'
uses a font weight of500
.
See Text Style fontWeight for remaining font weight values.
Type | Default |
---|---|
'semibold' or 'medium' or 'regular' or Text Style fontWeight | 'normal' |
size
Font size of the text.
Type | Default |
---|---|
number | 14 |
align
See Text Style textAlign.
Type | Default |
---|---|
Text Style textAlign | 'auto' |
color
Color of the text. The color will change based on the theme (dark or light) if set to 'default'
.
Type | Default |
---|---|
string or 'default' or 'primary' or 'error' or 'greyout' | 'default' |
contrast
If true
, the text will be displayed in a color that contrasts with the color set with the color
prop.
Type | Default |
---|---|
boolean | false |
marginTop
Type |
---|
number |
marginBottom
Type |
---|
number |