Founding sponsorYour name here
Arrow

Arrow

.arrow

I-beam

I-beam

.iBeam

I-beam, vertical

I-beam, vertical

.iBeamCursorForVerticalLayout

Pointing hand

Pointing hand

.pointingHand

Crosshair

Crosshair

.crosshair

Contextual menu

Contextual menu

.contextualMenu

Hover a card — your own pointer takes that shape. “The text cursor with bits at the top and bottom” is the I-beam.

Pointer (Cursor)

/ NSCursor · NSCursor.iBeam /

also called cursor, mouse pointer, mouse cursor

Every shape the Mac pointer takes has a real name. “The text cursor with little bits at the top and bottom” is the I-beam; the hand over a link is the pointing hand; the no-entry sign while dragging is operation not allowed. AppKit sets them through NSCursor, and views claim screen regions with cursor rects — when a pointer gets stuck in the wrong shape, a stale cursor rect is usually the culprit. (The rainbow “beach ball” is not an NSCursor: the system shows it when an app stops responding.)

If you called it…

the text cursor with little bits at the top and bottommouse stuck in text editing modethe arrow turns into a hand over linksdouble sided arrow when resizing a windowcursor with a plus badge when dragging to copythe mouse becomes a no entry signmagnifying glass cursor with a plus in it

…you meant a pointer (cursor).

Prompt — paste into your agent

Set the macOS pointer with NSCursor — e.g. NSCursor.iBeam.set() — or claim a region with NSView.addCursorRect(_:cursor:) inside resetCursorRects() (SwiftUI: View.pointerStyle(_:), macOS 15+). If the pointer stays stuck as the I-beam after the mouse leaves a text view, the stale cursor rect is the bug: call window.invalidateCursorRects(for: view) so the rects rebuild.

Debug prompt — when it misbehaves

Paste this, then describe what you’re seeing — it hands your agent the classic failure modes to rule out first.

Debug my macOS pointer/cursor (NSCursor, NSTrackingArea). Rule out: the cursor flickering back to arrow because cursor rects reset on every layout — drive it from cursorUpdate with a tracking area instead; push/pop or hide/unhide calls unbalanced; the spinning beach ball meaning the main thread is blocked, not a cursor bug; a hidden cursor never restored after a drag. The symptom:

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).

AppKitNSCursor
AppKitNSCursor.iBeamthe text-editing pointer
AppKitNSView.addCursorRect(_:cursor:)claim a region; called from resetCursorRects()
SwiftUIView.pointerStyle(_:)macOS 15+
CSScursor: textthe same shapes on the web: pointer, grab, not-allowed…

See also

Search

Describe the UI element you're thinking of