Tally UI

SearchInput

A styled search text input with magnifying glass icon

Import

import { SearchInput } from '@tallyui/components';

Usage

const [query, setQuery] = React.useState('');

<SearchInput value={query} onChangeText={setQuery} placeholder="Search products..." />

A controlled text input wrapped in a bordered container with a search icon. Typically placed above a product grid or list to drive filtering.

Props

PropTypeDefaultDescription
valuestringrequiredCurrent search text
onChangeText(text: string) => voidrequiredCalled when text changes
placeholderstring'Search...'Placeholder text
classNamestringOverride container styles

Plus all TextInputProps from React Native (except value and onChangeText which are required).

Default classes: flex-row items-center gap-2 rounded-lg border border-border bg-surface px-3 py-2

Live demo

On this page