Search Input

Search field with a clear button and a busy indicator while results load. Focus brightens the field, matching text in results can be highlighted, and a frosted glass style is included.

Preview

Props Changes apply to the live preview above.

Installation

npx @lumioui/cli add search-input

Usage

import { SearchInput, SearchMatch } from "@/components/ui/search-input/search-input";
<SearchInput />

Also exported: SearchMatch.

Examples

Team directory

The people directory in a team workspace.

Glass capsule

A maps-style capsule floating over the map/photo layer at the bottom edge, where the thumb lives.

API reference

SearchInput

Prop Type Default
label string

Visible label above the field.

—
helper string

Helper text below the field.

—
error string

Error message.

—
debounceMs number

Debounce duration in ms for onChangeText. While a debounced query is pending, the leading glyph shows busy dots.

—
searching boolean

A search is running (e.g. awaiting results) — the leading glyph shows busy dots until it turns false, then swaps back.

false
onClear () => void

Called when the clear button is pressed.

—
icon React.ReactNode

Leading icon slot.

—
className string

Classes for the input element.

—
containerClassName string

Classes for the outer wrapper.

—
glass boolean

Capsule mode — the field becomes a floating glass pill (search rides over content instead of sitting on the surface).

false
glassTint string

Glass mode only: tint the capsule (e.g. a dark wash over a bright photo).

—
size "sm" | "md"

Field height — "sm" 36pt (search inside a navigation bar), "md" 44pt (default, standalone search on a screen).

"md"

SearchMatch

Prop Type Default
text* string

The result text.

—
query* string

The query — its first case-insensitive match is lit.

—
className string

Classes for the whole line (size, weight).

—
numberOfLines number —