Compose Component

Label

Label component that will append a label to content.

Label social preview

Label

Source set: Common
@Composable
public fun Label(
    label: @Composable TooltipScope.() -> Unit,
    modifier: Modifier = Modifier,
    interactionSource: MutableInteractionSource? = null,
    isPersistent: Boolean = false,
    content: @Composable () -> Unit,
)

Parameters

label composable that will be appended to content
modifier Modifier that will be applied to content
interactionSource the MutableInteractionSource representing the stream of Interactions for the content.
isPersistent boolean to determine if the label should be persistent. If true, then the label will always show and be anchored to content. if false, then the label will only show when pressing down or hovering over the content.
content the composable that label will anchor to.
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: