Guides and Sample Code


macOS Human Interface Guidelines


Searching In a Window

A scope bar helps users specify locations or rules in a search, or filter objects by specific criteria. In general, scope bars are not always visible, but appear when the user initiates a search or similar operation. For example, when the user performs a find in Safari (shown here), a scope bar appears.

image: ../Art/with_scope_bar_2x.png

Use a scope bar to help users specify and narrow a search, or to filter items. You might provide a scope bar if you want users to be able to specify and refine a search while maintaining their focus in the window. If you need to give users a way to navigate or to select collections of items or data that should appear in the window, however, use a source list instead (described in Source Lists (Sidebars)). For example, the Dictionary app uses a scope bar to allow users to dynamically filter results by reference type (such as dictionary, thesaurus, or Apple dictionary), as shown here.

image: ../Art/filter_with_scope_bar_2x.png

If appropriate, let users refine a scoping operation. Users can specify additional rules to refine their scoping operation in filter rows that appear below a scope bar. A filter row can contain text fields that accept user input and round rectangle–style scope buttons (used for selecting or saving scoping criteria). For example, when users search in the Finder, they can click the Add button to view a new filter row with supplementary rules they can use to refine their search.

image: ../Art/finder_scope_bars_2x.png

Use the appropriate controls in a scope bar. In addition to the search field control, use only the recessed-style scope button and the round rectangle–style scope buttons, which are specifically designed for use in a scope bar. The recessed-style scope button can display scoping locations and categories, and the round rectangle–style scope button allows users to save or manipulate a scoping operation. To learn more about these controls, see Scope Button.

Allow users to save their searches. Users appreciate being able to perform specific searches again, especially if they spent time defining (and refining) a useful search.