Concrete
form
Component

Search bar

Compact single-line command input with removable scope tokens, keyboard hint, action slots, and optional menu slot.

Search bar is intentionally slot-first: it can stay a search field, become a prompt bar, or host a command menu without changing the primitive contract.

Playground

Props in the URL.

Controls update query params directly. Complex slots use curated fixtures so component states stay deterministic, linkable, and screenshot-ready.

Loading playground.
States

Rendered matrix.

Every state maps to the same component render route through the `state` query param.

Default

Plain search with shortcut and trailing action.

/render state
Scoped

Search with removable scope tokens and action slots.

/render state
Research
Menu

Search bar composed with the command menu slot.

/render state
Props

Public contract.

NameTypeDefaultDescription
querystring-Controlled input query.
defaultValuestring''Uncontrolled initial query.
tokensreadonly SearchToken[]-Optional removable scope chips before the input.
actionsReactNode-Trailing action slot for submit, filter, or mode controls.
menuReactNode-Popdown slot, commonly a CommandMenu.
menuPlacement'popdown' | 'inline'popdownWhether the menu floats over content or reserves flow height.
shortcutreadonly string[][]Keyboard hint rendered as a grouped chord in the field.
wrapbooleanfalseAllows tokens and input to wrap when a composition wants taller search chrome.
onSubmit(query: string) => void-Called on form submit.
onTokenRemove(token: SearchToken) => void-Called when a token close button is clicked.