---
title: "NavigationRailItem"
description: "Material Design navigation rail item."
type: "component"
---

<div class='type'>Composable Component</div>



Material Design navigation rail item.

<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
@Composable
fun NavigationRailItem(
    selected: Boolean,
    onClick: () -> Unit,
    icon: @Composable () -> Unit,
    modifier: Modifier = Modifier,
    enabled: Boolean = true,
    label: @Composable (() -> Unit)? = null,
    alwaysShowLabel: Boolean = true,
    colors: NavigationRailItemColors = NavigationRailItemDefaults.colors(),
    interactionSource: MutableInteractionSource? = null,
)
```


#### Parameters

| | |
| --- | --- |
| selected | whether this item is selected |
| onClick | called when this item is clicked |
| icon | icon for this item, typically an `Icon` |
| modifier | the `Modifier` to be applied to this item |
| enabled | controls the enabled state of this item. When `false`, this component will not respond to user input, and it will appear visually disabled and disabled to accessibility services. |
| label | optional text label for this item |
| alwaysShowLabel | whether to always show the label for this item. If false, the label will only be shown when this item is selected. |
| colors | `NavigationRailItemColors` that will be used to resolve the colors used for this item in different states. See `NavigationRailItemDefaults.colors`. |
| interactionSource | an optional hoisted `MutableInteractionSource` for observing and emitting `Interaction`s for this item. You can use this to change the item's appearance or preview the item in different states. Note that if `null` is provided, interactions will still happen internally. |






