JengaMediaHero

fun JengaMediaHero(title: String, modifier: Modifier = Modifier, imageUrl: String? = null, support: String? = null, aspectRatio: Float = JengaMediaHeroDefaults.AspectRatio, onClick: () -> Unit? = null, badge: @Composable () -> Unit? = null, action: @Composable () -> Unit? = null, titleStyle: TextStyle = JengaTheme.typography.display, colors: JengaMediaHeroColors = JengaMediaHeroDefaults.colors(), shape: Shape = JengaMediaHeroDefaults.shape, overline: @Composable () -> Unit? = null, fallback: @Composable BoxScope.() -> Unit? = null)(source)

A full-bleed media hero: an image (cropped, never stretched) under a bottom scrim with a title and one support line, plus optional top-start badge and top-end action overlays. When imageUrl is null/blank a themed fallback shows instead of a grey box, so the layout never breaks.

Generic and domain-neutral: supply your own fallback slot for a branded placeholder motif, or your own colors/titleStyle.

Parameters

title

the hero title (over the scrim, bottom-start).

modifier

the Modifier for this hero; it sizes to aspectRatio.

imageUrl

the image URL, or null/blank to show the fallback.

support

an optional single support line under the title.

aspectRatio

width:height ratio of the hero.

onClick

optional tap handler for the whole hero.

badge

optional top-start overlay (e.g. a status pill).

action

optional top-end overlay (e.g. an icon button).

titleStyle

the title text style; defaults to the display style.

colors

the color set; defaults to JengaMediaHeroDefaults.colors.

overline

an optional slot rendered just above the title (e.g. a provenance pill); inherits the title color.

fallback

drawn behind the image (and shown alone when there is none); defaults to the themed JengaMediaHeroColors.fallback fill.