NavigationRailTileSchema

@Serializable
@SerialName(value = "NavigationRail")
data class NavigationRailTileSchema(val id: String, val events: SerializableImmutableList<EventSchema>?, val style: StyleSchema, val searchableTerms: SerializableImmutableList<String>?, val visibility: TileSchema.Visibility, val items: SerializableImmutableList<NavigationRailTileSchema.NavigationRailItem>, val selectedItemId: String, val header: TileSchema? = null, val footer: TileSchema? = null) : TileSchema

Renders a Material 3 NavigationRail — the side-rail counterpart of NavigationBarTileSchema — with one NavigationRailItem per entry in items, plus 4dp horizontal and 8dp vertical padding applied by the renderer. An item is selected when its NavigationRailItem.id equals selectedItemId; the selected item's icon is drawn in its filled variant, the others outlined. NavigationRailItem.label is rendered centered under the icon, or omitted when null.

Header and footer: header is rendered in the rail's header slot above the items; footer is rendered at the very bottom, pushed down by a weighted spacer so it hugs the bottom edge. Both are arbitrary tiles and both are optional.

Selection: tapping an item dispatches a local NavigationRailTileEvents.OnItemClicked and the holder stores the new selectedItemId, so the highlight moves immediately without a server round trip. Tapping the already selected item still fires everything again.

Triggers dispatched:

  • OnNavigationRailItemClickEventTrigger — fired when an item is tapped, carrying that item's NavigationRailItem.id, so events can be wired per item.

Notes: the rail itself is not clickable and fires no display trigger. It only tracks the selected item — performing the actual navigation is up to the events wired to the item clicks.

Constructors

Link copied to clipboard
constructor(id: String, events: SerializableImmutableList<EventSchema>?, style: StyleSchema, searchableTerms: SerializableImmutableList<String>?, visibility: TileSchema.Visibility, items: SerializableImmutableList<NavigationRailTileSchema.NavigationRailItem>, selectedItemId: String, header: TileSchema? = null, footer: TileSchema? = null)

Types

Link copied to clipboard
@Serializable
data class NavigationRailItem(val id: String, val icon: IconSchema, val label: String?)

Properties

Link copied to clipboard
@SerialName(value = "events")
open override val events: SerializableImmutableList<EventSchema>?
Link copied to clipboard
@SerialName(value = "footer")
val footer: TileSchema?
Link copied to clipboard
@SerialName(value = "header")
val header: TileSchema?
Link copied to clipboard
@SerialName(value = "id")
open override val id: String
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "searchableTerms")
open override val searchableTerms: SerializableImmutableList<String>?
Link copied to clipboard
@SerialName(value = "selectedItemId")
val selectedItemId: String
Link copied to clipboard
@SerialName(value = "style")
open override val style: StyleSchema
Link copied to clipboard
@SerialName(value = "visibility")
open override val visibility: TileSchema.Visibility

Functions

Link copied to clipboard
open fun isGone(): Boolean
Link copied to clipboard
open fun isVisible(): Boolean