Skip to main content

GenericSearch

A debounced search input with a clear button. Designed to sit above data lists and tables.

πŸ“– Storybook

Preview​

Import​

import { GenericSearch } from "@xocialive/ui-components";

Basic usage​

<GenericSearch value={searchTerm} onChange={(value) => setSearchTerm(value)} placeholder="Search users..." />

Props​

PropTypeDefaultDescription
valuestringβ€”Controlled value
onChange(value: string) => voidβ€”Change handler (receives the text string)
placeholderstring"Search..."Input placeholder
debounceMsnumber300Debounce delay before onChange fires
disabledbooleanfalseDisables the input
sxSxProps<Theme>β€”Root element style overrides