OudsBodyText
Body styles are designed for everyday text content such as paragraphs, descriptions, and informational messages. They prioritize readability and provide a comfortable reading experience across all screen sizes. Multiple size options allow content importance to be expressed while maintaining consistency. Their typography automatically scales across breakpoints to support responsive layouts.
An overload accepting annotated string is available for rich text formatting.
Design
| Name | Body |
| Version | 1.0.0 |
Parameters
Text to be displayed.
Modifier applied to the body text.
Size of the body text.
Weight of the body text.
Color of the body text.
Alignment of the text within the lines of the paragraph. See TextStyle.textAlign.
Line height for the Paragraph in TextUnit unit, e.g. SP or EM. See TextStyle.lineHeight.
How visual overflow should be handled.
Callback that is executed when a new text layout is calculated. A TextLayoutResult object that callback provides contains paragraph information, size of the text, baselines and other details. The callback can be used to add additional decoration or functionality to the text. For example, to draw selection around the text.
Samples
OudsBodyText(
modifier = Modifier.padding(OudsTheme.spaces.fixed.small),
text = "Body",
size = OudsBodyTextSize.Medium,
weight = OudsTextWeight.Moderate
)Body styles are designed for everyday text content such as paragraphs, descriptions, and informational messages. They prioritize readability and provide a comfortable reading experience across all screen sizes. Multiple size options allow content importance to be expressed while maintaining consistency. Their typography automatically scales across breakpoints to support responsive layouts.
An overload accepting plain text is available for simple text without formatting.
Design
| Name | Body |
| Version | 1.0.0 |
Parameters
Text to be displayed. Note: Use rich text in compliance with guidelines and accessibility criteria.
Modifier applied to the body text.
Size of the body text.
Weight of the body text.
Color of the body text.
Alignment of the text within the lines of the paragraph. See TextStyle.textAlign.
Line height for the Paragraph in TextUnit unit, e.g. SP or EM. See TextStyle.lineHeight.
How visual overflow should be handled.
Callback that is executed when a new text layout is calculated. A TextLayoutResult object that callback provides contains paragraph information, size of the text, baselines and other details. The callback can be used to add additional decoration or functionality to the text. For example, to draw selection around the text.
Samples
val highlightColor = OudsTheme.colorScheme.content.brandPrimary
OudsBodyText(
modifier = Modifier.padding(OudsTheme.spaces.fixed.small),
text = buildOudsAnnotatedBodyText {
withStrong {
withColor(color = highlightColor) { append("Important update") }
}
append(", see details ")
withLink(link = OudsLinkAnnotation.Url("https://example.com/details")) { append("here") }
append(".")
},
size = OudsBodyTextSize.Large
)