Founding sponsorYour name here
📄
Save As:
Where:📁 Documents
📁 Desktop
📁 Documents
📁 Downloads
Format:Pages

Click the little chevron next to the name — that’s the disclosure button

Save Panel

/ NSSavePanel · View.fileExporter(isPresented:document:contentType:defaultFilename:onCompletion:) /

also called save dialog, save-as panel, file save picker, NSSavePanel

A save panel is the system dialog for choosing a filename, location, and sometimes file format. Its compact form can expand into a Finder-like browser with a sidebar and directory contents. NSSavePanel supplies the native behavior, validation, sandbox integration, and sheet presentation.

If you called it…

the mac save as windowthe dialog where you name a file before savingthe little arrow that expands the save dialogthe file format dropdown in save asthe finder sidebar inside the save window

…you meant a save panel.

Anatomy — every part, named

  1. 1
    Name fieldNSSavePanel.nameFieldStringValue

    The editable Save As text box is the panel's name field.

  2. 2
    Disclosure expansion buttonNSSavePanel.isExpanded

    “The little arrow that makes the save window bigger” is the disclosure button for the panel's expanded browser.

  3. 3
    Format pop-upNSSavePanel.allowedContentTypes

    The file-type selector beneath the name is the format pop-up, constrained by the panel's allowed content types.

Prompt — paste into your agent

Present the standard Save Panel with NSSavePanel (SwiftUI workflow: View.fileExporter), including its editable name field, disclosure button for the expanded file browser, allowed-content-type format pop-up, and Finder-style sidebar. Do not rebuild the system save dialog from custom controls.

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 save panel (NSSavePanel, NSOpenPanel). Rule out: sandboxed URLs failing later because startAccessingSecurityScopedResource was never called or a bookmark was never saved; allowedContentTypes filtering out everything so Save stays disabled; runModal blocking the app when beginSheetModal was intended; the panel opening in the wrong folder because directoryURL is set after presentation. 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).

AppKitNSSavePanel
SwiftUIView.fileExporter(isPresented:document:contentType:defaultFilename:onCompletion:)
AppKitNSSavePanel.beginSheetModal(for:completionHandler:)

See also

Search

Describe the UI element you're thinking of