Skip to main content
Text(content: string | { markdown: string }): Component;

Parameters

content
string | { markdown: string }
The text content to display. Can be a plain string or an object with a markdown property for markdown-formatted text.

Support

Usage

Plain text

Text("Hello, World!")

Styled text

Text("Styled text")
    .font("headline")
    .foregroundStyle(Color("blue"))
    .bold()

Markdown text

Text({ markdown: "**Bold** and *italic* text with [links](https://example.com)" })

Multiline text with alignment

Text("This is a longer text that will wrap across multiple lines")
    .multilineTextAlignment("center")
    .lineLimit(3)