Text
Display text for show information, description, and others texts.
import { Text } from '@redshank/native';
Default
You can display an Text
Text Align
Align text options
Max Lines
Use the lines prop for to set the number of lines of text to
Text Utilities
Displays a list of options to play
APIs
Text Props
More props in Text props from React Native
Attribute | Type | Accepted values | Description | Default |
---|---|---|---|---|
align | string | Align | Align title text | left |
children | string ReactNode | any | Accessory as a child for the component | - |
containerStyle | object | StyleProp<ViewStyle> | Style for wrapper text | - |
bold | boolean | true false | Make text bold | - |
color | ThemeColor string | ThemeColor | Change icon color | text |
fontWeight | number bold normal | 100 to 900 | Weight property | - |
italic | boolean | true false | Make text italic | false |
lines | number | number | Number of lines you want to show on the screen | - |
lineHeight | number | number | Line height property | - |
margin | number string | number string | Element margin | - |
marginBottom | number string | number string | Element margin bottom | - |
marginHorizontal | number string | number string | Element margin horizontal, left and right | - |
marginVertical | number string | number string | Element margin vertical, top and bottom | - |
marginTop | number string | number string | Element margin top | - |
readMore | boolean | true false | Shows a small message to show the rest of the content, it works in conjunction with lines prop | - |
readMoreButtonProps | object | ButtonProps | Extra properties that can be passed to the read more/less GoogleButton | - |
style | object | StyleProp<ViewStyle> | Style text | - |
textLessMore | string | string | Text for text to display when readMore is true and text state NOT is collapsed | none |
textReadMore | string | string | Text for text to display when readMore is true and text state NOT is collapsed | none |
transform | string | Transform | Transform title text | none |
underline | boolean | true false | Underline style | - |
Align
type AlignType = 'left' | 'center' | 'right' | 'justify';
Transform
type TransformType = 'none' | 'uppercase' | 'lowercase' | 'capitalize';
Community:
We're excited to see the community adopt @redshank/native, raise issues, and provide feedback. Whether it's a feature request, bug report, or a project to showcase, please get involved!
DiscordGithubContributing:
PR's on @redshank/native are always welcome, please see our contribution guidelines to learn how you can contribute to this project.