What is NSPanel?

Developer terms Published

All of glossary Try NotchStar in the browser Buy for $4

NSPanel is a class in Apple’s AppKit framework for a window that Apple describes as typically performing a function auxiliary to the main window. Palettes, inspectors and floating tool windows are panels.

Why it matters

A normal window takes focus from the app you are using when it appears. For a panel you hover over to open, that would be disruptive: your typing would stop going where you were typing. A panel created with the .nonactivatingPanel style mask does not make its app the active one when you click it.

How NotchStar uses it

The notch is an NSPanel with the .borderless and .nonactivatingPanel styles, placed above the menu bar. The panel returns false from canBecomeKey by default, so it can take mouse events without taking keyboard focus. A second panel variant allows key status, and it becomes key only when a tool needs typing, such as Quick Notes or the teleprompter editor. SwiftUI draws the contents inside the panel through a hosting view.

Why not pure SwiftUI

SwiftUI describes the views, but the window level, the style mask and the focus rules are AppKit features. A notch app therefore mixes the two: SwiftUI for the views, AppKit for the window.

See what is a notch app for the user side, and hover intent for how opening is timed.

Keep reading.

What is AppKit?
AppKit is Apple's older framework for building Mac apps with windows, menus and events. Learn what it covers and why SwiftUI apps still use it.
What is SwiftUI?
SwiftUI is Apple's framework for declaring an app's user interface in Swift code. Learn what it does, how it meets AppKit and how NotchStar uses both.
What is hover intent?
Hover intent is a short delay before a hover opens something, so passing the pointer by does not trigger it. Learn how NotchStar tunes it at the notch.
What is a notch app? A plain English guide
A notch app turns the dead space around the MacBook notch into a tiny control center. Here is how they work, what they do and what to watch for.

More in Developer terms.

What is SwiftUI?
SwiftUI is Apple's framework for declaring an app's user interface in Swift code. Learn what it does, how it meets AppKit and how NotchStar uses both.
What is AppKit?
AppKit is Apple's older framework for building Mac apps with windows, menus and events. Learn what it covers and why SwiftUI apps still use it.
What is NSPasteboard?
NSPasteboard is the AppKit object that moves data to and from the Mac clipboard. Learn how apps read it and why clipboard managers poll change count.
What is MediaRemote on macOS?
MediaRemote is a private Apple framework that reports what is playing on a Mac. Learn why it is restricted since macOS 15.4 and how notch apps work around it.
What is hover intent?
Hover intent is a short delay before a hover opens something, so passing the pointer by does not trigger it. Learn how NotchStar tunes it at the notch.
What does open source mean?
Open source software publishes its source code under a license that lets others read and change it. Learn the definition and how it differs from closed source.
NotchStar app icon

Put your notch to work.

Buy it once for $4, activate it in a minute, and keep it. Not sure yet? Try every tool in the browser on the home page, or install the 7 day trial.