Jenga Thumbnail Strip
Square thumbnails (e.g. photos attached to a record) with an optional dashed "add" tile at the end, in one scrolling row or wrapped over several lines (see layout). Each thumbnail slot is clipped to shape and sized to thumbnailSize; put an image and any tap handling there.
Parameters
the number of thumbnails.
the Modifier for the strip.
called when the add tile is tapped; null hides the tile.
accessibility label for the add tile.
the icon inside the add tile; inherits the add color.
the edge length of each thumbnail and the add tile; defaults to the theme's value, else JengaThumbnailStripDefaults.ThumbnailSize.
the gap between tiles, across and between lines.
padding around the tiles.
the tile shape.
the color set; defaults to JengaThumbnailStripDefaults.colors.
one scrolling row, or wrapped lines; see JengaThumbnailStripLayout.
the content of the thumbnail at an index.
Samples
val photos = listOf(
"https://example.com/1.jpg",
"https://example.com/2.jpg",
)
JengaThumbnailStrip(
count = photos.size,
onAdd = {},
addContentDescription = "Add photo",
thumbnail = { index ->
JengaImage(
url = photos[index],
contentDescription = null,
)
},
)