Founding sponsorYour name here
📄Q3 Report.pages
📄Notes.md
📄installer.dmg

The small grey triangle left of each folder is the disclosure triangle — click it and watch it rotate

Disclosure Triangle

/ NSOutlineView · DisclosureGroup /

also called disclosure control, outline disclosure button, expand-collapse triangle

A disclosure triangle is the compact indicator beside an outline row or section label that reveals nested content. It points sideways while collapsed and rotates downward when expanded. NSOutlineView supplies disclosure controls for hierarchical rows, while DisclosureGroup provides the same expand-and-collapse pattern in SwiftUI.

If you called it…

the tiny triangle that opens a folder rowlittle arrow that rotates when a section expandschevron beside a row with childrensmall expand collapse arrow in an outlinetriangle next to a heading that shows more content

…you meant a disclosure triangle.

Anatomy — every part, named

  1. 1
    Disclosure indicatorNSButton.BezelStyle.disclosure

    “The tiny triangle beside the row” is the disclosure indicator.

  2. 2
    Collapsed stateDisclosureGroup.isExpanded

    “The arrow pointing sideways before it opens” is the collapsed state.

  3. 3
    Expanded stateDisclosureGroup.isExpanded

    “The arrow rotated down after it opens” is the expanded state.

Prompt — paste into your agent

Use a native Disclosure Triangle for expandable rows: NSOutlineView for an outline hierarchy or SwiftUI DisclosureGroup for a standalone section. The small indicator must rotate between collapsed and expanded states while the row's children appear directly beneath it.

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 disclosure triangle (NSButton .disclosure bezel, SwiftUI DisclosureGroup). Rule out: the isExpanded binding not actually driving the revealed content; several groups sharing one binding so they all toggle together; the triangle animating the wrong direction because state and rotation are set separately; baseline misalignment between the triangle and its label. 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).

AppKitNSOutlineView
SwiftUIDisclosureGroup
AppKitNSButton.BezelStyle.disclosurea standalone disclosure button style

See also

Search

Describe the UI element you're thinking of