ConnectedCardLazyGrid

fun ConnectedCardLazyGrid(items: List<StylishConnectedCardItem>, columns: Int, modifier: Modifier = Modifier, spacing: Dp = StylishTheme.dimensions.connectedSpacing, contentPadding: PaddingValues = PaddingValues(horizontal = DefaultStylishDimensions.controlPadding), listState: LazyGridState = rememberLazyGridState(), card: ConnectedCardItemContent)

A headless lazily-composed grid of connected cards laid out in equal-width cells across a fixed number of columns (Structure layer).

Unlike ConnectedCardGrid, only the visible rows are composed and rendered: each grid row of columns cards becomes a single full-span item of a LazyVerticalGrid. The full items list is known up front, so the connection geometry is computed exactly as in the eager grid: within each row every card receives equal weight, corner radii are computed from each item's absolute index so that only the four outer corners of the entire grid are rounded, and a partially filled final row stretches to fill the full row width. The actual rendering is delegated to the card lambda, which receives the pre-computed connection geometry.

This component makes no visual or interactive decisions — no colors, elevation, or animation. It is the headless backbone that the Stylish Finish counterpart StylishConnectedCardLazyGrid consumes by supplying a styled card. Supply your own card to render a custom skin over the same connected geometry.

Parameters

items

The list of StylishConnectedCardItem data objects describing each card.

columns

The number of equal-width columns in the grid. Must be greater than zero.

spacing

The gap between adjacent cards both horizontally and vertically. Defaults to StylishTheme.dimensions.connectedSpacing (3 dp).

contentPadding

PaddingValues applied around the entire lazy grid. Defaults to DefaultStylishDimensions.controlPadding horizontal padding.

listState

LazyGridState controlling scroll position. Defaults to rememberLazyGridState. Supply a hoisted state to observe scroll offset or programmatically scroll.

card

A composable lambda that renders a single card. Receives the item data, a modifier (fill-max-width within an equal-weight cell), the connected Shape, the outline ConnectedEdges, and the outline ConnectedCorners.

See also