Nav Rail
Narrow fixed vertical navigation rail for icon-based navigation with bottom actions.
Default
Base
| Class | Description |
|---|---|
.ui-nav-rail | Base class |
End
| Class | Description |
|---|---|
.ui-nav-rail--end | end |
Override these CSS custom properties to customize the component.
| Token | Default | Description |
|---|---|---|
--ui-nav-rail-width |
var(--ui-row-4) |
Overall width |
--ui-nav-rail-bg |
var(--ui-color-bg-subtle) |
Background color |
--ui-nav-rail-border-color |
var(--ui-color-border) |
Border color |
--ui-nav-rail-gap |
var(--ui-space-1) |
Gap between children |
--ui-nav-rail-z |
var(--ui-z-index-sticky) |
Z-index stacking order |
End Position
<!-- Rail on the end (right in LTR) side. -->
<nav class="ui-nav-rail ui-nav-rail--end">
<div class="ui-nav-rail__items">
<!-- icon buttons -->
</div>
<div class="ui-nav-rail__actions">
<!-- settings, profile -->
</div>
</nav>
With Topbar
App
<!-- Nav rail respects --topbar-height, offsetting below the topbar. -->
<body class="ui-app-shell" style="--topbar-height: var(--ui-row-3)">
<header class="ui-topbar ui-topbar--fixed ui-topbar--bordered">
<div class="ui-topbar__start"><strong>App</strong></div>
</header>
<nav class="ui-nav-rail">
<div class="ui-nav-rail__items"><!-- icons --></div>
</nav>
</body>