Windows — Fluent
JS behaviour
Desktop: windows & Metro start
A whole Windows on one screen: real windows that drag by their title bar, minimise, maximise and close, edge snapping, a taskbar with a live clock, and a start menu of live Metro tiles that keep bringing fresh news.
Real scenarios
The component as it is used in a product — not a specimen grid.
One whole Windows on one stage
Drag the windows by their title bar, throw them at the edges to snap, and open Start — the Metro tiles keep bringing fresh weather, mail and photos.
The partnership contract
Hello, the final version of the contract is attached. If the numbers on page two look good, we can sign it this week.
۰ characters
Autosaved
Important props
| Prop | Type | Default | What it does |
|---|---|---|---|
| windows | manager | 'z-order' | Clicking a window raises it above the rest; only the active one keeps its full shadow. |
| snap | zones | 'left · right' | Dragging to the edges previews the screen half and release snaps it. |
| start-tiles | metro | 'live' | Metro’s small/wide/large tiles with live content: temperature, mail count, date, photos. |
| taskbar | layout | 'centred' | Pinned icons centred, running pills beneath, tray and clock at the end. |
Snippet
<div class="fldesk" x-data="{ z: 10, windows: ['explorer', 'mail'] }">
<div class="fldesk-win" v-for… x-show="open.explorer"
x-on:pointerdown="z++" style="z-index: bind">
<div class="fldesk-title" x-on:pointerdown="drag($event)">…caption…</div>
</div>
<div class="fldesk-taskbar">
<button class="fldesk-start" x-on:click="start = !start">⊞</button>
…pinned + clock…
</div>
<div class="fldesk-startmenu" x-show="start">…metro tiles…</div>
</div>
<style>
.fldesk { position: relative; overflow: clip; block-size: 32rem; border-radius: 8px;
background: radial-gradient(120% 120% at 70% 20%, #2c4a8a, #0f1c38 60%, #0a1226); }
.fldesk-win { position: absolute; min-inline-size: 18rem; background: #f3f3f3;
border-radius: 8px; box-shadow: 0 16px 48px #00000059; }
.fldesk-title { block-size: 32px; touch-action: none; cursor: grab; }
</style>