JengaLink

fun JengaLink(text: String, onClick: () -> Unit, modifier: Modifier = Modifier, style: TextStyle = JengaLinkDefaults.textStyle, colors: JengaLinkColors = JengaLinkDefaults.colors(), enabled: Boolean = true, underline: Boolean = JengaLinkDefaults.underline, leadingIcon: @Composable () -> Unit? = null, contentPadding: PaddingValues = JengaLinkDefaults.contentPadding)(source)

A tappable text link: brand-coloured and underlined by convention, the way a hyperlink reads. The caller decides what a tap does (open a URL through the platform LocalUriHandler, navigate, and so on), so the link stays framework-agnostic and cannot leak a URL type into the design system.

It carries no ripple: an inline link should feel like text, not a button. It reserves no 48dp layout box, so it fits a tight row (e.g. a section header action); taps just outside a small link still reach it through Compose's minimum touch target.

Parameters

text

the link label.

onClick

invoked when the link is tapped; not called while disabled.

modifier

the Modifier for this link.

style
colors

the link colors; defaults to JengaLinkDefaults.colors.

enabled

whether the link responds to taps and uses its enabled color.

underline

whether the label is underlined (the link affordance).

leadingIcon

optional icon before the label; inherits the link color.

contentPadding

padding around the icon and label.

Samples

JengaLink(
    text = "Privacy policy",
    onClick = {},
)