AsterUIDocsv1.0.2

Docs / Component reference

SearchInput

Enter a query, clear it, and show when a search is running. The caller decides which records match.

Search input example

Install

sh
npx @fierst/ui@1.0.2 add search-input

Registry dependencies: theme, icon. Package dependencies: @lucide/icons.

Exports from ./ui/search-input: SearchInput.

Download the registry source for search-input 1.0.2.

API contracts

ts
export function* SearchInput(
  props: {
    value?: string;
    defaultValue?: string;
    placeholder?: string;
    loading?: boolean;
    shortcutHint?: string;
    onChange?: (val: string) => void;
    onSubmit?: (val: string) => void;
    class?: string;
  },
  ctx: Ctx,
)