Palette
One surface for finding a thing or running a command by typing, the same in every product.
import { Palette, PaletteInput, PaletteFilters and 6 more } from "@arcadia/ui"Try it
TSX
Examples
- ↓↑
- 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 itsdata-theme, or a transformed stage to containposition: fixedoverlays (previews). rootStyle- RootStyle
- A component's typed override prop:
Layoutand 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:
Layoutand 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"
loadingkeeps the last results;errordrops 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:
Layoutand 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:
Layoutand 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
MatchTextwhere the query found it. description- ReactNode
- A line under it: the line it was found by.
meta- ReactNode
- Where it is, when.
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:
Layoutand 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:
Layoutand 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.