Back to Components

macOS

TitleBar

Drag region with centered title — the macOS-style window chrome. Drag-to-move via -webkit-app-region: drag; islands are no-drag.

Examples

Default with TrafficLights

Library

3,204 books · 47 authors

<TitleBar title="Library" subtitle="3,204 books">
  {#snippet leading()}
    <TrafficLights onClose={…} onMinimise={…} onZoom={…} />
  {/snippet}
</TitleBar>

Props

PropTypeDefaultDescription
titlestringCentered window title.
subtitlestringSmaller line below.
heightstring'38px'CSS length for the bar height.
leadingSnippetLeft-side island (typically TrafficLights).
trailingSnippetRight-side island (window-level affordances).

Install

CLI

npx @a3tai/mittsu add title-bar