StylishConnectedListItemLazyColumn

fun StylishConnectedListItemLazyColumn(items: List<StylishConnectedListItem>, modifier: Modifier = Modifier, spacing: Dp = StylishTheme.dimensions.connectedSpacing, contentPadding: PaddingValues = PaddingValues(horizontal = DefaultStylishDimensions.controlPadding), listState: LazyListState = rememberLazyListState(), headlineMaxLines: Int = Int.MAX_VALUE, headlineOverflow: TextOverflow = TextOverflow.Ellipsis, headlineStyle: TextStyle = MaterialTheme.typography.titleMedium, supportingTextMaxLines: Int = Int.MAX_VALUE, supportingTextOverflow: TextOverflow = TextOverflow.Ellipsis, supportingTextStyle: TextStyle = MaterialTheme.typography.bodyMedium, containerColor: Color? = null, contentColor: Color? = null, horizontalPadding: Dp = 16.dp, verticalPadding: Dp = 14.dp, contentSpacing: Dp = StylishTheme.dimensions.itemSpacing, interactionSource: MutableInteractionSource? = null, listItem: ConnectedListItemContent = { item, itemModifier, shape, edges, corners -> DefaultStylishConnectedListItem( item, itemModifier, shape, edges, corners, headlineMaxLines, headlineOverflow, headlineStyle, supportingTextMaxLines, supportingTextOverflow, supportingTextStyle, containerColor, contentColor, horizontalPadding, verticalPadding, contentSpacing, interactionSource = interactionSource, ) })

A lazily-composed vertical group of connected list items that share outlines and corner radii, typically used for long grouped settings sections or navigation menus.

This is the Finish-layer component: it supplies the Stylish list-item rendering (DefaultStylishConnectedListItem) to the headless Structure layout ConnectedListItemLazyColumn, which owns arrangement and connection geometry. Only the visible rows are composed, while the connection geometry is computed exactly as in the eager StylishConnectedListItemColumn: the first item rounds only its top corners, the last item rounds only its bottom corners, and middle items have square corners. Each item displays a headline, optional supporting text, additional supporting lines, and optional leading/trailing slot content. Items whose StylishConnectedListItem.onClick and StylishConnectedListItem.onLongClick are both null, or whose StylishConnectedListItem.enabled is false, are rendered without elevation and do not respond to interaction. Pass a custom listItem to override the Stylish rendering while keeping the connected geometry.

Parameters

items

The list of StylishConnectedListItem data objects that describe each row's headline, supporting text, click/long-click actions, enabled state, and slot content.

spacing

The vertical gap between adjacent items. Defaults to StylishTheme.dimensions.connectedSpacing (3 dp).

contentPadding

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

listState

LazyListState controlling scroll position. Defaults to rememberLazyListState. Supply a hoisted state to observe scroll offset or programmatically scroll.

headlineMaxLines

Maximum number of lines for the headline text. Defaults to Int.MAX_VALUE (unlimited).

headlineOverflow

The TextOverflow strategy for the headline when it exceeds headlineMaxLines. Defaults to TextOverflow.Ellipsis.

headlineStyle

The TextStyle applied to each item's headline. Defaults to MaterialTheme.typography.titleMedium.

supportingTextMaxLines

Maximum number of lines for supporting text and supporting lines. Defaults to Int.MAX_VALUE (unlimited).

supportingTextOverflow

The TextOverflow strategy for supporting text. Defaults to TextOverflow.Ellipsis.

supportingTextStyle

The TextStyle applied to supporting text and supporting lines. Defaults to MaterialTheme.typography.bodyMedium.

containerColor

The background color of each item surface. When null, defaults to MaterialTheme.stylishComponentColors.groupedContainer.

contentColor

The content color of each item surface. When null, defaults to an enabled/disabled-aware color.

horizontalPadding

The horizontal padding inside each item. Defaults to 16 dp.

verticalPadding

The vertical padding inside each item. Defaults to 14 dp.

contentSpacing

The horizontal gap between the leading slot, text block, and trailing slot inside each item. Defaults to StylishTheme.dimensions.itemSpacing (8 dp).

interactionSource

The MutableInteractionSource forwarded to each actionable item to observe press/hover/focus interactions for the state layer. When null, each item remembers its own. Pass a shared source to observe group-level interaction, e.g. to trigger a state update from a parent.

listItem

A composable lambda that renders a single item. Receives the item data, a modifier (fill-max-width), the connected Shape, the outline ConnectedEdges, and the outline ConnectedCorners. Defaults to DefaultStylishConnectedListItem, dressed in the Stylish look with the text, color, padding, and spacing parameters above.

See also