API reference
API reference
Select your platform
No SDKs available
No versions available

SpatialSideNavItem Function

Modifiers: final
A single item in a side navigation menu.

Signature

fun SpatialSideNavItem(icon: () -> Unit, onClick: () -> Unit, primaryLabel: String, modifier: Modifier = Modifier, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, secondaryLabel: String? = null, collapsed: Boolean = false, dense: Boolean = false, showExpandedIcon: Boolean = true, selected: Boolean = false)

Parameters

icon: Function0
A composable function that represents the icon of the item.
onClick: Function0
Callback invoked when the item is clicked.
primaryLabel: String
The primary label text of the item.
modifier: Modifier
Modifier to be applied to the item.
interactionSource: MutableInteractionSource
MutableInteractionSource for handling interactions.
secondaryLabel: String?
The secondary label text of the item (optional).
collapsed: Boolean
Whether the side navigation is collapsed or expanded.
dense: Boolean
Whether the item should be displayed in a dense format.
showExpandedIcon: Boolean
Whether to show the icon when expanded.
selected: Boolean
Whether the item is selected or not.
Did you find this page helpful?