Package-level declarations

JengaMediaHero and JengaImageViewer, a full-screen viewer for one image or several pages with zoom.

Types

Link copied to clipboard
class JengaImageViewerColors(val container: Color, val content: Color)

Resolved colors for a JengaImageViewer. Override via JengaImageViewerDefaults.colors.

Link copied to clipboard

Defaults and token mappings for JengaImageViewer.

Link copied to clipboard
class JengaMediaHeroColors(val fallback: Brush, val scrim: Brush, val title: Color, val support: Color)

Resolved colors for a JengaMediaHero. Override via JengaMediaHeroDefaults.colors.

Link copied to clipboard

Defaults and token mappings for JengaMediaHero.

Functions

Link copied to clipboard
fun JengaImageViewer(onDismissRequest: () -> Unit, title: String, closeContentDescription: String, modifier: Modifier = Modifier, actions: @Composable RowScope.() -> Unit = {}, titleStyle: TextStyle = JengaImageViewerDefaults.titleStyle, maxScale: Float = JengaImageViewerDefaults.MaxScale, colors: JengaImageViewerColors = JengaImageViewerDefaults.colors(), content: @Composable () -> Unit)

A full-screen image viewer on a dark backdrop: a top row with a close button, a title and trailing actions (e.g. download, share), above the image in content. The image can be pinch-zoomed and panned, and a double tap toggles zoom. Pressing back or the close button calls onDismissRequest.

fun JengaImageViewer(pageCount: Int, onDismissRequest: () -> Unit, title: (page: Int) -> String, closeContentDescription: String, modifier: Modifier = Modifier, initialPage: Int = 0, actions: @Composable RowScope.(page: Int) -> Unit = {}, bottomBar: @Composable (page: Int, goToPage: (Int) -> Unit) -> Unit = { _, _ -> }, titleStyle: TextStyle = JengaImageViewerDefaults.titleStyle, maxScale: Float = JengaImageViewerDefaults.MaxScale, colors: JengaImageViewerColors = JengaImageViewerDefaults.colors(), pageContent: @Composable (page: Int) -> Unit)

A full-screen viewer for several images: swipe sideways between pageCount pages, each pinch-zoomed on its own. Pages swipe only while the current page is not zoomed in, and a page's zoom resets when it leaves the screen. Pressing back or the close button calls onDismissRequest.

Link copied to clipboard
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)

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.