Skip to main content

Text

Displays a string using the SwiftUI Text element

Official Docs

Preview

no preview available

Example Usage

   <RNSwiftUI.VStack>

<RNSwiftUI.Text enableMarkdown >This is regular text.</RNSwiftUI.Text>
<RNSwiftUI.Text enableMarkdown foregroundColor="#00aaaa" >This is a colored text.</RNSwiftUI.Text>
<RNSwiftUI.Text enableMarkdown >This is **bold** text, this is *italic* text, and this is ***bold, italic*** text.</RNSwiftUI.Text>
<RNSwiftUI.Text enableMarkdown >~~A strikethrough example~~</RNSwiftUI.Text>
<RNSwiftUI.Text enableMarkdown >`Monospaced works too`</RNSwiftUI.Text>
<RNSwiftUI.Text enableMarkdown >Visit our docs: [click here](https://rn-render-swift-ui.netlify.app)</RNSwiftUI.Text>

</RNSwiftUI.VStack>

Props

nametyperequireddescription
childrenReact.ReactNodeThe string that should be displayed as text
enableMarkdownReact.ReactNodeEnables Markdown interpretation for the Text. Default is false

extends SwiftUIViewProperties