Skip to content
ArcadiaDesign
Try it

TSX

One surface for finding a thing or running a command by typing, the same in every product: the kit's dialog placed at the top, its width and frame and shadow the dialog's, named by a hidden title. The product keeps what is its own: the rows, how it searches and ranks them, what a filter means, the key that opens it. The palette holds no query and searches nothing: it draws the rows it is given, in order.

The field is Headline, with no frame and no glyph before it, and the focus stays in it while the palette is open. Rows are the one row, Body at 28px, and one leading column runs through every group: a group whose rows would all lead with the same glyph leads with none, its label naming the kind. The palette is as tall as what it holds, up to --palette-height, and its top never moves. From 640 down it spans the window less 8 a side, 8 from the top, and its list takes the height the visual viewport leaves, the on-screen keyboard counted.

Examples

No query

The product's rows, recent things or suggestions, or none: with none the palette is its field, and its footer where a fine pointer is.

Recent rows
Nothing yet

A query in flight

The last results stay drawn and usable, and the list keeps its height until the answer lands, in one frame. Past 200ms the loading line runs under the field, for 400ms at least.

The results for hana while hana up is asked

No result and a failure

No result is one line in the quiet ink with the query in it. A failure says what failed and offers Try again, and its last results are gone.

No result
A failure

A failed search never shows old rows as if they were its answer: status="error" drops them, and onRetry runs the search again.

Filters in force

The filters in force stand under the field as the board's bar draws them, beside the menu that adds one: one Tab stop, the arrow keys inside.

Bug and Urgent

The row wraps to a second line before it would scroll sideways, and Backspace in the empty field calls onRemoveLast, so the last filter goes.

A found word

MatchText marks what a search found as a selection is drawn, in ink: a square wash of --fill-2, its ink raised to --text-1, never the accent.

TSX

Pass the ranges a search found, or the query, whose words it finds where a word starts. A row's label and its line under it take one, and keep their marks as they step down to fit.

The field is a combobox that owns the list: aria-controls names it and aria-activedescendant the lit row, so the focus stays in the field. The list is a listbox while it holds rows, each group a group named by its label, each row an option; a disabled row is aria-disabled and says why in its tooltip. Once the typing rests the count of results is said politely, and a failure at once. The palette is named by its label, a hidden title.

↓↑
Move the light, round from one end to the other
Page DownPage Up
Move it by a page
Enter
Run the lit row; with ⌘ or Ctrl, the row may open in a new tab
Esc
Close, whatever the field holds
Tab
Go to the filters and the footer, and back to the field
Backspace
In the empty field, drop the last filter

Palette

openrequired
boolean
onOpenChangerequired
(open: boolean, details: OpenChangeDetails) => void
onOpenChangeComplete
(open: boolean) => void
labelrequired
string
Its name ("Search"), a hidden title.
instant
boolean
A shortcut's open: there in one frame.
modal
booleanDefault true
false: set down open on a page.
container
PortalContainer
Where a surface's portal mounts. Default: document.body. Pass a themed subtree to keep its data-theme, or a transformed stage to contain position: fixed overlays (previews).
rootStyle
RootStyle
A component's typed override prop: Layout and its documented knobs, each the references it takes or another kit knob of its kind; anything else is a type error at the call site (STYLEX.md).

valuerequired
string
onValueChangerequired
(value: string, details: { event: Event }) => void

Rest props go to <input> props.

onRemoveLast
() => void
Backspace in the empty field.
label
stringDefault "Filters"
rootStyle
RootStyle
A component's typed override prop: Layout and its documented knobs, each the references it takes or another kit knob of its kind; anything else is a type error at the call site (STYLEX.md).
children
ReactNode
Chips and a menu's trigger.

status
"ready" | "loading" | "error"Default "ready"
loading keeps the last results; error drops them.
onRetry
() => void
The failure's "Try again".
error
ReactNodeDefault "Could not search"
What failed.
label
stringDefault "Results"
rootStyle
RootStyle
A component's typed override prop: Layout and its documented knobs, each the references it takes or another kit knob of its kind; anything else is a type error at the call site (STYLEX.md).

labelrequired
ReactNode
What its rows are ("Cards").
rootStyle
RootStyle
A component's typed override prop: Layout and its documented knobs, each the references it takes or another kit knob of its kind; anything else is a type error at the call site (STYLEX.md).

labelrequired
ReactNode
A MatchText where the query found it.
description
ReactNode
A line under it: the line it was found by.
leading
IconName | ReactNode
A glyph, a mark, or a picture at size="text".
meta
ReactNode
Where it is, when.
shortcut
ShortcutSpec
Its own keys, in the meta's place.
onSelect
(event: PaletteSelectEvent) => void
keepOpen
booleanDefault false
disabled
boolean | stringDefault false
A sentence says why, in its tooltip.
rootStyle
RootStyle
A component's typed override prop: Layout and its documented knobs, each the references it takes or another kit knob of its kind; anything else is a type error at the call site (STYLEX.md).

queryrequired
string
children
ReactNode
Other words ("No cards match Bug").

rootStyle
RootStyle
A component's typed override prop: Layout and its documented knobs, each the references it takes or another kit knob of its kind; anything else is a type error at the call site (STYLEX.md).
children
ReactNode
A KeyLegend, drawn only where a fine pointer is.

ranges
readonly (readonly [number, number])[]
What a search found, each [start, end).
query
string
Or the query: its words, found where a word starts.