name thatuiuser interface
Search…EnabledSave

The blue glow around the focused control is the focus ring

Focus Ring

/ NSView.focusRingType · NSWindow.makeFirstResponder(_:) /

also called keyboard focus indicator, focus halo, first responder ring

A focus ring is the accent-colored glow, commonly blue, around the control that currently receives keyboard interaction. Text fields normally accept focus, while Full Keyboard Access allows Tab to move focus through additional controls such as buttons and pop-up buttons. AppKit draws the ring for the first responder according to its focusRingType, and custom layouts must leave enough space for that ring to remain visible.

Anatomy — every part, named

  1. 1
    First responderNSWindow.firstResponder

    “The control that will get my typing” is the window's first responder.

Prompt — paste into your agent

Preserve the native Focus Ring around the first responder. In AppKit, make the control eligible for first-responder status, move focus with NSWindow.makeFirstResponder(_:), and keep NSView.focusRingType at .default; in SwiftUI, use View.focusable(_:) with FocusState. Leave enough space for the standard macOS accent-colored ring and do not replace it with a custom border.

In code

The exact names this thing goes by in code — each row is one framework’s word for it. Use the row that matches your project (or paste it into your prompt).

AppKitNSView.focusRingType
AppKitNSWindow.makeFirstResponder(_:)
AppKitNSFocusRingType
SwiftUIView.focusable(_:)
SwiftUIFocusState

See also

Search

Describe the UI element you're thinking of