GenericSearch
A debounced search input with a clear button. Designed to sit above data lists and tables.
π StorybookPreviewβ
Live previewβ Open in Storybook
Importβ
import { GenericSearch } from "@xocialive/ui-components";
Basic usageβ
<GenericSearch value={searchTerm} onChange={(value) => setSearchTerm(value)} placeholder="Search users..." />
Propsβ
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | β | Controlled value |
onChange | (value: string) => void | β | Change handler (receives the text string) |
placeholder | string | "Search..." | Input placeholder |
debounceMs | number | 300 | Debounce delay before onChange fires |
disabled | boolean | false | Disables the input |
sx | SxProps<Theme> | β | Root element style overrides |