Windows — Fluent JS behaviour

NavigationView

The backbone of Win11 apps: a hamburger that collapses the pane, selection markers glued to the edge, settings pinned at the bottom, and icon tooltips while collapsed.

Documentation

Real scenarios

The component as it is used in a product — not a specimen grid.

The backbone of a Win11 app

The hamburger folds the pane down to a 48px icon rail — hover a collapsed icon for its name. The 3×16 pill hugs the start edge of the selection, and Settings stays pinned at the foot.

Settings

Home

Pick a section from the pane — this heading follows your selection.

Device nameNabu-Book Pro
ProcessorNava 9
Memory16 GB
EditionWindows 11 Pro, 24H2

Expanded is 256px with labels; compact is a 48px rail with tooltips.

Important props

Important props
Prop Type Default What it does
display-mode state 'expanded · compact' expanded keeps labels; compact is a 48px icon rail.
selection-indicator pill '3×16' A 3×16 pill glued to the start edge of the active item.
footer area 'settings' Settings and pinned items live at the pane’s foot.

Snippet

<div class="flnav">
    <aside class="flnav-pane">
        <button class="flnav-item" data-current><span class="flnav-pill"></span>🏠 خانه</button>
        <button class="flnav-item">📁 فایل‌ها</button>
    </aside>
    <main>…</main>
</div>

<style>
.flnav-pane { inline-size: 256px; padding: 4px 12px; }
.flnav-item { position: relative; display: flex; gap: 12px; align-items: center;
              block-size: 36px; padding-inline: 12px; border-radius: 4px; }
.flnav-pill { position: absolute; inset-inline-start: 0; inline-size: 3px; block-size: 16px;
              border-radius: 999px; background: transparent; }
.flnav-item[data-current] { background: #0000000f; }
.flnav-item[data-current] .flnav-pill { background: #005FB8; }
</style>