Founding sponsorYour name here

Library

Rows that indent and expand make this an outline view, not a list

Outline View

/ NSOutlineView · OutlineGroup /

also called tree view, hierarchical list, outline list, expandable table

An outline view is a tree-shaped list: rows can contain children, indentation shows depth, and disclosure triangles expand or collapse branches. A plain list has no hierarchy. A source list is a sidebar appearance and navigation convention that can be implemented with an outline view, but the terms are not interchangeable.

If you called it…

the indented list with little expand arrowstree of folders where rows have childrena list with nested rows you can open and closethe sidebar-looking list with hierarchy levelsexpandable rows indented under their parent

…you meant a outline view.

Anatomy — every part, named

  1. 1
    Disclosure triangleNSOutlineView

    “The little expand arrow beside a row” is its disclosure triangle.

  2. 2
    Indentation levelNSOutlineView.level(forItem:)

    “How far a child row steps in from its parent” is its indentation level.

  3. 3
    Row selection highlightNSTableRowView.isSelected

    “The colored strip behind the current row” is the row selection highlight.

Prompt — paste into your agent

Use an Outline View with NSOutlineView (SwiftUI: OutlineGroup) for the indented hierarchy: parent rows receive disclosure triangles and expanding one reveals child rows directly beneath it. Use a flat list only when rows have no children; apply source-list styling separately if the outline serves as a sidebar.

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 outline view (NSOutlineView). Rule out: rows refusing to expand because isItemExpandable and the child-count delegate answers disagree; reloadItem without reloadChildren:true leaving stale children; autosaveExpandedItems silently broken because items lack stable identity for persistentObject round-trips; row animations jumping because the model mutated before the animated update ran. 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
SwiftUIOutlineGroup
SwiftUIListwhen supplied hierarchical children

See also

Search

Describe the UI element you're thinking of