sheengemologic ui
All components

SearchInput

Labeled search input with a localized clear action.@gemologic/sheen · forms

Playground

<SearchInput label="Search orders" defaultValue="BTC" />

Variant matrix

Search orders

Anatomy

Package
@gemologic/sheen
Source
packages/ui/src/primitives/SearchInput.tsx
Tokens
  • --sheen-color-bg-inset
  • --sheen-color-border-control
  • --sheen-control-h-md

Accessibility

Role: searchbox plus a native clear buttonKeyboard: Native text editing, Tab to clear action, Enter or Space clears and restores input focus

Do

  • Own requests, debounce, composition-aware search scheduling, and stale-result handling in the app.
  • Keep existing results visible during query refresh. Use native onInput for detailed input/composition events.

Do not

  • Do not treat this as an autocomplete or results popup.
  • Do not switch between controlled and uncontrolled ownership during the control's lifetime.

Generated props

NameTypeDefaultDescription
valuestringControlled query. When supplied, the parent must accept changes through onValueChange. An active IME draft remains locally visible until composition ends.
defaultValuestringInitial uncontrolled query and native form-reset target, ignored when value is supplied.
onValueChange(value: string) => voidReceives input and clear edits synchronously, including composition input, and changed uncontrolled values after an uncanceled form reset. No fetching or debounce is performed.
clearLabelstringOverride the localized clear-search action label.
shortcutShortcutAction | undefinedOptional typed shortcut registration that focuses the input when a ShortcutProvider is present.
descriptionstringAssociated search instructions.
label *stringRequired visible label.
errorstringApp-owned validation message.
Native Solid/HTML attributes remain available and are omitted from this authored-prop view.