Back to Components

macOS

TrafficLights

macOS window controls — close (red) / minimise (yellow) / zoom (green). Wire each callback to your window manager (Tauri / Wails / Electron).

Examples

Default (hover to reveal glyphs)

<TrafficLights
  onClose={() => …}
  onMinimise={() => …}
  onZoom={() => …}
/>

Always show glyphs

<TrafficLights alwaysShowGlyphs />

Disabled

<TrafficLights disabled />

Props

PropTypeDefaultDescription
onClose() => voidCalled when the red dot is clicked.
onMinimise() => voidCalled when the yellow dot is clicked.
onZoom() => voidCalled when the green dot is clicked.
disabledbooleanfalseAll dots become inactive.
alwaysShowGlyphsbooleanfalseDon't require hover to show the × − + glyphs.

Install

CLI

npx @a3tai/mittsu add traffic-lights