<h2 id="navigationrail-modifier-containercolor-contentcolor-header-content">NavigationRail</h2>

<div class='sourceset sourceset-android'>Android</div>

```kotlin
@ExperimentalMaterial3XrApi
@Composable
public fun NavigationRail(
    modifier: Modifier = Modifier,
    containerColor: Color = NavigationRailDefaults.ContainerColor,
    contentColor: Color = contentColorFor(containerColor),
    header: @Composable (ColumnScope.() -> Unit)? = null,
    content: @Composable ColumnScope.() -> Unit,
)
```

#### Parameters

| | |
| --- | --- |
| modifier | the [Modifier](/jetpack-compose/androidx.compose.ui/ui/interfaces/Modifier) to be applied to this navigation rail |
| containerColor | the color used for the background of this navigation rail. Use `Color.Transparent` to have no color. |
| contentColor | the preferred color for content inside this navigation rail. Defaults to either the matching content color for `containerColor`, or to the current [LocalContentColor](/jetpack-compose/androidx.compose.material/material/properties/LocalContentColor) if `containerColor` is not a color from the theme. |
| header | optional header that may hold a [FloatingActionButton](/jetpack-compose/androidx.compose.material/material/components/FloatingActionButton) or a logo |
| content | the content of this navigation rail, typically 3-7 [NavigationRailItem](/jetpack-compose/androidx.compose.material/material/components/NavigationRailItem)s |