Skip to content
nexubDesign System
v12.7.0

Components · Form & Input

Search Input

StableAdded v0.0.1

A text input pre-wired with a search icon and a clear button for filtering content.

import { SearchInput } from '@nexub/react';
View as Markdown

Playground

Props

TSX
<SearchInput placeholder="Search…" />

Examples

Default

States

  • default
  • invalid
  • loading
  • size="sm"
  • size="md"
  • size="lg"

Props

Props
PropTypeDefaultDescription
placeholderstring—Placeholder text shown when empty.
valuestring—Controlled value of the search field.
onClear(() => void)—Called when the user clicks the clear button.
size'sm' | 'md' | 'lg'—Controls font size and padding.
clearableboolean—Shows a clear button while there is a value. Clearing fires onChange with "".
invalidboolean—
leadingAddonstring—
loadingboolean—Spinner in the trailing slot and aria-busy on the input.
showCountboolean—Shows a "12/80" counter; needs maxLength. Announced politely near the limit.
trailingAddonstring—
wrapperClassNamestring—