addItem

fun addItem(id: String, icon: IconSchema, label: String? = null)

Declares one entry of a NavigationRail.

Parameters

id

Identifier matched against selectedItemId and carried by onNavigationRailItemClick when this item is tapped.

icon

Icon shown for this item, drawn filled when selected and outlined otherwise.

label

Text shown centered under the icon. Defaults to none (icon only).