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
| Prop | Type | Default | Description |
|---|---|---|---|
onClose | () => void | — | Called when the red dot is clicked. |
onMinimise | () => void | — | Called when the yellow dot is clicked. |
onZoom | () => void | — | Called when the green dot is clicked. |
disabled | boolean | false | All dots become inactive. |
alwaysShowGlyphs | boolean | false | Don't require hover to show the × − + glyphs. |
Install
CLI
npx @a3tai/mittsu add traffic-lights