macOS
JS behaviour
The Mac window
A Sonoma window: traffic lights whose glyphs appear on hover, a unified toolbar over a vibrant sidebar, a hairline separator, and the big soft shadow real windows cast.
Real scenarios
The component as it is used in a product — not a specimen grid.
The Mac window
Hover the traffic lights to see their glyphs; the zoom button gently scales the frame and the sidebar toggle folds the vibrant strip away.
Nabu website redesign
۲۴ items · ۱۴:۰۵
Basket app
۱۸ items · ۱۲:۳۰
Library docs
۴۱ items · دیروز
Nowruz ۱۴۰۵ campaign
۱۲ items · دیروز
Autumn quarterly report
۷ items · ۲ مهر
Important props
| Prop | Type | Default | What it does |
|---|---|---|---|
| traffic-lights | buttons | '12px' | Three 12px circles; glyphs appear on hover or group focus. |
| toolbar | height | '52px' | The unified toolbar: title centred, tools on the sides. |
| vibrancy | material | 'sidebar' | The sidebar picks up what is behind the window, saturated. |
Snippet
<div class="mcwin">
<header class="mcwin-bar">
<div class="mcwin-lights">
<button data-close></button><button data-min></button><button data-zoom></button>
</div>
<span class="mcwin-title">پروژهها</span>
</header>
<div class="mcwin-body">
<aside class="mcwin-side">…</aside>
<main>…</main>
</div>
</div>
<style>
.mcwin { border-radius: 10px; overflow: clip; background: #ececec;
box-shadow: 0 22px 70px 4px #00000040, 0 0 0 .5px #00000026; }
.mcwin-lights { display: flex; gap: 8px; }
.mcwin-lights button { inline-size: 12px; aspect-ratio: 1; border-radius: 50%; }
[data-close] { background: #FF5F57; } [data-min] { background: #FEBC2E; } [data-zoom] { background: #28C840; }
</style>