Background color of the chooser panel. When nil (the default), the panel uses
the system's translucent glass/material effect.
If you set this to a solid or near-opaque color, also set textColor, subTextColor,
and placeholderColor to ensure readable contrast — they are not adjusted automatically.
Border color drawn around the chooser panel. When nil (the default), no border is drawn.
Width of the border drawn around the chooser panel, in points (default: 1).
Has no effect unless borderColor is also set.
Corner radius of the chooser panel, in points (default: 14).
When true and the query is non-empty but there are no matching choices, onSelect
is called with { text: <query> } instead of null (default: false).
ReadonlyidentifierStable UUID string for this chooser instance.
Readonlyistrue if the chooser panel is currently on screen.
Called after the panel is hidden (for any reason: selection, Escape, or hide()), or null to remove the handler.
Called when the user activates a row whose valid field is false, or null to remove the handler.
The chooser stays open; the argument is the row dict (same shape as onSelect).
If unset, activating an invalid row is silently ignored.
Called on every keystroke with the new query string, or null to remove the handler. Use this to debounce expensive searches or trigger async data fetching.
Called when the user confirms a selection, or null to remove the handler.
The argument is the chosen row object (the original dict you passed to setChoices,
with text, subText, image, valid, and any custom fields intact).
The argument is null when dismissed (Escape).
Called after the panel becomes visible, or null to remove the handler.
Placeholder text shown in the empty search field (default: "Search...").
Color of the placeholder text (and search icon) shown in an empty search field.
When nil (the default), the system's secondary label color is used.
The current text in the search field. Setting this from JS updates the display but
does not invoke the onQueryChange callback.
Color of the text the user types into the search field. When nil (the default),
the system's primary label color is used.
Font size of the search field's typed text and placeholder, in points (default: 20).
Changing this also rescales the search icon, and changes the search bar height
(and therefore the panel height) to fit. Must be a positive, finite number; invalid
values are ignored (with a warning logged).
Whether searches match against subText in addition to text (default: false).
Only applies when a static choices array is provided.
The zero-based index of the currently highlighted row (-1 when empty).
Background tint of the highlighted row. When nil (the default), a translucent
tint of the system accent color is used.
Color of each result row's subtext. When nil (the default), the system's
secondary label color is used.
Font size of each result row's subtext, in points (default: 12). Changing this
also changes the row height (and therefore the panel height) to fit. Must be a
positive, finite number; invalid values are ignored (with a warning logged).
Color of each result row's main text. When nil (the default), the system's
primary label color is used.
Font size of each result row's main text, in points (default: 14). Changing this
also rescales the ⌘-digit shortcut hint shown on the first ten rows, and changes the
row height (and therefore the panel height) to fit. Must be a positive, finite number;
invalid values are ignored (with a warning logged).
ReadonlytypeRead-only type identifier.
Maximum number of rows visible at once without scrolling (default: 10).
Width of the chooser as a fraction of the screen width (default: 0.5 = 50 %).
Hide the chooser without making a selection. Restores focus to the previously active window.
Self for chaining
Re-apply filtering (static choices) or re-invoke the choices function (dynamic).
Call after updating an external data source in an async onQueryChange handler.
Self for chaining
Programmatically confirm a selection.
Omit row to confirm the currently highlighted row. Fires onSelect (or onInvalid
for rows with valid: false) and hides the chooser.
Zero-based row index, or omit to use the current selection.
Self for chaining
Returns the dict for the highlighted row, or for a specific row by index.
Returns null if the index is out of range or no choices are set.
Zero-based row index, or omit to query the highlighted row.
The row dict ({ text, subText?, image?, valid, ...extras }) or null.
on show. The function is responsible for filtering; the chooser displays all items it returns.
An array of choice objects, or a function (query) => [...]
Self for chaining
A keyboard-driven floating chooser panel. Create via
hs.chooser.create(). Configure choices, set callbacks, then call.show().Choice format
Each choice is a plain object with required
textand optionalsubText,image,valid, andcontextMenufields. All other fields are passed through to theonSelectcallback unchanged. ThecontextMenuarray defines per-row right-click menu entries. Each entry is eitherKeyboard shortcuts