Windows — Fluent JS behaviour

Expander

Win11 settings’ expander: a header with a rotating chevron, content unfolding with a height animation, content-above/below modes, and a border that only shows while open.

Documentation

Real scenarios

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

Settings that unfold

The header turns its chevron on a spring curve, the body unfolds by height — never by clipping tricks — and the border with its hairline only exists while open. The second expander opens upward.

Speakers Realtek® Audio — default

Exclusive mode mutes every other app while playing.

Device nameNabu-Book Pro
Memory16 GB
Storage512 GB SSD
EditionWindows 11 Pro, 24H2

Click, Enter or Space — the whole header is the target. One opens down, the other up.

Important props

Important props
Prop Type Default What it does
direction string 'down' Content opens below the header, or above it (up).
expand trigger 'click · Enter' Click, Enter or Space; the whole header is the target.
chevron rotation '180°' A half turn on Fluent’s spring curve.

Snippet

<details class="flexp">
    <summary><span>کیفیت صدا</span><i class="flexp-chev">▾</i></summary>
    <div class="flexp-body">…settings rows…</div>
</details>

<style>
.flexp { border-radius: 4px; border: 1px solid #00000014; background: #fdfdfdfd; }
.flexp summary { display: flex; justify-content: space-between; align-items: center;
                 block-size: 48px; padding-inline: 16px; }
.flexp-chev { transition: rotate .2s ease; }
.flexp[open] .flexp-chev { rotate: 180deg; }
.flexp-body { padding: 4px 16px 16px; }
</style>