Lucent UI
TextareaSearchInputSelect
✦ LLM-ready

SearchInput

atom

Text field with a leading search icon and an inline results dropdown. Supports label, helper text, and error state. Suitable for filtering, look-ups, and autocomplete flows.

"Add a SearchInput from lucent-ui. Filter a local array based on the input value and show matching results in the dropdown."

Usage

React / JSX
import { SearchInput } from 'lucent-ui'

<SearchInput size="md" label="SearchInput" placeholder="SearchInput" />

Installation

pnpm add lucent-ui

API Reference

SearchInput props — * required

PropTypeDefaultDescription
value*stringControlled search query.
onChange*(value: string) => voidCalled on every keystroke.
size"sm" | "md" | "lg""md"Height and font scale — passed through to the underlying Input.
labelstringLabel displayed above the search input.
helperTextstringHint or description below the input.
errorTextstringError message; triggers the error visual state.
placeholderstringHint text when empty.
resultsArray<{ id: number | string; label: string }>Dropdown options to display.
onResultSelect(result: { id: number | string; label: string }) => voidCalled when the user clicks a result.
isLoadingbooleanfalseShows a spinner in the dropdown.
disabledbooleanfalsePrevents interaction.