Windows — Fluent JS behaviour

Command bar

Explorer’s command bar: icon+label buttons that stack vertically when squeezed, a «⋯» overflow with an acrylic menu, vertical separators, and the classic File/Edit/View menu bar mode.

Documentation

Real scenarios

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

A command bar that repacks itself

Drag the width slider (or resize the window) and the commands that no longer fit drop into the «⋯» overflow. Squeeze further and labels slide under the icons; the classic File/Edit/View row is below.

Files — This PC › Documents › Projects
This PC Documents Projects
Projects 24 items
Sales report 2 MB
Trip photos 48 MB
Meeting note 12 KB

Ready

The overflow is measured from the real stage width, so it keeps working when the page itself is narrow.

Important props

Important props
Prop Type Default What it does
overflow menu 'auto' What does not fit lands in «⋯»; it repacks live on resize.
labels layout 'side · below' Labels beside the icon (default) or under it, compact.
menu-bar mode 'optional' The classic File/Edit/View row with acrylic submenus.

Snippet

<div class="flcmd">
    <button class="flcmd-btn"><span>✂︎</span> برش</button>
    <button class="flcmd-btn"><span>⧉</span> کپی</button>
    <span class="flcmd-sep"></span>
    <button class="flcmd-more" aria-label="بیشتر">⋯</button>
</div>

<style>
.flcmd { display: flex; align-items: center; gap: 4px; padding: 4px; }
.flcmd-btn { display: inline-flex; align-items: center; gap: 8px; block-size: 36px;
             padding-inline: 12px; border-radius: 4px; }
.flcmd-btn:hover { background: #0000000a; }
.flcmd-sep { inline-size: 1px; block-size: 24px; margin-inline: 4px; background: #00000029; }
</style>