font, fontWeight, and fontDesign choose the typeface, weight, and variant. bold, italic, monospaced, strikethrough, and underline are convenience toggles for common styles and decorations.
tracking and lineSpacing adjust spacing between letters and lines. textCase transforms case at render time. lineLimit and multilineTextAlignment control how text wraps and aligns across multiple lines.
font
Sets the font for text content in a component.The font to apply. Can be:
- A semantic text style name (e.g.,
"title","body","caption") — see TextStyle - A number for a custom point size using the system font
- A
CustomFontfor a custom font family with a specific size
fontWeight
Sets the font weight for text content.The font weight to apply. See FontWeight for available values (e.g.,
"ultraLight", "thin", "light", "regular", "medium", "semibold", "bold", "heavy", "black").fontDesign
Sets the font design variant for text content.The font design variant. See FontDesign for available values (e.g.,
"default", "rounded", "monospaced", "serif").bold
Makes text bold.Whether bold is applied. Pass
false to explicitly disable bold. Defaults to true.italic
Makes text italic.strikethrough
Adds a strikethrough line to text.underline
Adds an underline to text.monospaced
Uses a monospaced font variant for text.tracking
Adjusts letter spacing in text.The letter spacing to add between characters.
MilliEm is an alias for number, and every renderer applies the value as a length: points on iOS, CSS pixels on web, and sp on Android. Use positive values to increase spacing or negative values to tighten.tracking does not scale with the font size. For example, tracking(4) adds 4pt of spacing between each character on iOS, the same as CSS letter-spacing: 4px on web.
Wide letter spacing
lineSpacing
Adjusts spacing between lines of text.textCase
Transforms the text case of a component.lineLimit
Limits text to a maximum number of lines with truncation.The maximum number of lines to display. Excess text is truncated with an ellipsis. Pass
undefined or omit to remove any line limit....) at the end. Passing undefined or omitting the argument removes any previously set line limit, allowing unlimited lines.
Single-line text
multilineTextAlignment
Sets horizontal text alignment within the component’s frame.The horizontal alignment for multi-line text. One of
"leading", "center", or "trailing"..frame() alignment. The default alignment is "leading".
Center-aligned text
See also
- minimumScaleFactor — allows text to shrink before truncating
- foregroundStyle — set text color
- dynamicTypeSize — override the user’s preferred text size
- fontWidth — set the font width variant
- TextStyle — semantic text style names for
font - FontWeight — available font weights
- FontDesign — available font design variants