JetLimeColumn

fun <T> JetLimeColumn(itemsList: ItemsList<T>, modifier: Modifier = Modifier, style: JetLimeStyle = JetLimeDefaults.columnStyle(), 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 vertical timeline interface with a list of items.

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

Example usage:

val items = remember { getItemsList() }

JetLimeColumn(
itemsList = ItemsList(items),
key = { _, item -> item.id },
style = JetLimeDefaults.columnStyle(),
) { 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 JetLimeColumn.

modifier

A modifier to be applied to the LazyColumn.

style

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

listState

The state object to be used for the LazyColumn.

contentPadding

The padding to apply to the content inside the LazyColumn.

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.