JetLimeRow

fun <T> JetLimeRow(itemsList: ItemsList<T>, modifier: Modifier = Modifier, style: JetLimeStyle = JetLimeDefaults.rowStyle(), listState: LazyListState = rememberLazyListState(), contentPadding: PaddingValues = PaddingValues(0.dp), key: (index: Int, item: T) -> Any? = null, itemContent: @Composable (index: Int, T, EventPosition) -> Unit)

A composable function that creates a horizontal timeline interface with a list of items.

This function sets up a LazyRow layout for displaying items in a horizontal timeline format. It allows for customization of its appearance and behavior through various parameters.

Example usage:

val items = remember { getItemsList() }

JetLimeRow(
itemsList = ItemsList(items),
key = { _, item -> item.id },
style = JetLimeDefaults.rowStyle(),
) { index, item, position ->
JetLimeEvent(
style = JetLimeEventDefaults.eventStyle(position = position)
) {
ComposableContent(item = item)
}
}

Parameters

T

The type of items in the items list.

itemsList

A list of items to be displayed in the JetLimeRow.

modifier

A modifier to be applied to the LazyRow.

style

The JetLime style configuration. Defaults to a predefined row style.

listState

The state object to be used for the LazyRow.

contentPadding

The padding to apply to the content inside the LazyRow.

key

A factory of stable and unique keys representing the item. Using the same key for multiple items in the list is not allowed. Type of the key should be saveable via Bundle on Android. If null is passed the position in the list will represent the key.

itemContent

A composable lambda that takes an index, an item of type T, and an EventPosition to build each item's content.