Property

LocalTextConfiguration

CompositionLocal containing the preferred TextConfiguration that will be used by Text components by default consisting of text alignment, overflow specification and max lines.

Source set: Android
public val LocalTextConfiguration: ProvidableCompositionLocal<TextConfiguration> =
    compositionLocalOf(structuralEqualityPolicy()) {
        TextConfiguration(
            TextConfigurationDefaults.TextAlign,
            TextConfigurationDefaults.Overflow,
            TextConfigurationDefaults.MaxLines,
        )
    }

CompositionLocal containing the preferred TextConfiguration that will be used by Text components by default consisting of text alignment, overflow specification and max lines. Material3 components related to text such as Button, CheckboxButton, SwitchButton, RadioButton use LocalTextConfiguration to set values with which to style child text components.

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: