Interface

TextAutoSize

Interface used by Text composables to override text size to automatically grow or shrink text to fill the layout bounds.

TextAutoSizeBasicTextSample

/** Sample of using [TextAutoSize.StepBased] to auto-size text. */
@Composable
fun TextAutoSizeBasicTextSample() {
    Box(modifier = Modifier.size(200.dp)) {
        // The text will find the biggest available font size that fits in the box.
        BasicText(text = "Hello World", autoSize = TextAutoSize.StepBased())
    }
}