UX4G Logo
Components

Tooltip

Contextual helper bubble explaining technical terms, mandatory requirements, and field guidance tips

Contextual helper bubble explaining technical terms, mandatory requirements, and field guidance tips.

Import from com.ux4g.designsystemv1.components.tooltip.Ux4gTooltip.


Interactive Preview

Ux4gTooltipJetpack Compose
UX4G Tooltip Preview

Kotlin Usage

Compose Example
import androidx.compose.runtime.Composable
import androidx.compose.material3.Icon
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.Info
import com.ux4g.designsystemv1.components.tooltip.Ux4gTooltip
import com.ux4g.designsystemv1.theme.Ux4gTheme

@Composable
fun TooltipExample() {
    Ux4gTooltip(tooltipText = "Mandatory document for direct benefit bank transfer") {
        Icon(Icons.Outlined.Info, contentDescription = "Help", tint = Ux4gTheme.colorScheme.primary)
    }
}

Parameters

PropTypeDescriptionDefault
tooltipText *StringGuidance explanation text displayed inside the tooltip bubble.—
content *@Composable () -> UnitAnchor composable trigger that opens the tooltip on tap or hover.—
modifierModifierCompose layout modifier.Modifier
backgroundColorColorTooltip bubble background container color.Ux4gTheme.colorScheme.onSurface
textColorColorTooltip text font color.Ux4gTheme.colorScheme.surface

On this page