Package-level declarations

Functions

Link copied to clipboard
fun <T> LazyTree(root: TreeNode<T>, modifier: Modifier = Modifier, initiallyExpanded: Boolean = true, nodeContent: @Composable (node: TreeNode<T>, depth: Int, expanded: Boolean, toggle: () -> Unit) -> Unit)

A lazily-rendered, expand/collapse tree for Compose Multiplatform. Only the currently-visible nodes are composed, so it scales to large trees. Expansion state is remembered internally, keyed by node identity.

fun <T> LazyTree(root: TreeNode<T>, modifier: Modifier = Modifier, initiallyExpanded: Boolean = true, indent: Dp = 16.dp, label: (T) -> String = { it.toString() })

Convenience overload of LazyTree that renders each node with the built-in TreeNodeRow, so the common case is a single call:

Link copied to clipboard
fun <T> TreeNodeRow(node: TreeNode<T>, depth: Int, expanded: Boolean, toggle: () -> Unit, modifier: Modifier = Modifier, indent: Dp = 16.dp, label: (T) -> String = { it.toString() })

A sensible default row for a single node in a LazyTree. The whole row is clickable to expand or collapse, indentation reflects depth, and a / marker precedes non-leaf nodes.