We just launched Compose Examples featuring over 150+ components! Check it out →

ProvideTextStyle

Common

Component in Material 3 Compose

This function is used to set the current value of [LocalTextStyle], merging the given style with the current style values for any missing attributes. Any [Text] components included in this component's [content] will be styled with this style unless styled explicitly.

@see LocalTextStyle

Last updated:

Installation

dependencies {
   implementation("androidx.compose.material3:material3:1.4.0-alpha02")
}

Overloads

@Composable
fun ProvideTextStyle(value: TextStyle, content: @Composable () -> Unit)
by @alexstyl