Forms · Search field

SearchField

Searchbox primitive with clear and submit behavior. Soma owns value, focus, clear, keyboard and ARIA; Eidos adds size, variant and intent color.

parts{compiled.parts.order.length} events{events.length} keyboard2 sizes3 variants3
{ if (!disabled && !readonly && !justCommitted) resultsOpen = true; }} > { lastValueChange = next === '' ? 'empty' : next; lastValueChangeAt = Date.now(); if (!disabled && !readonly) resultsOpen = true; }} onSubmit={(next) => { lastSubmit = next || 'empty'; resultsOpen = false; }} onClear={() => { lastSubmit = 'cleared'; resultsOpen = false; }} > e.preventDefault()} onCloseAutoFocus={(e) => e.preventDefault()} >
    {#if results.length === 0}
  • No matches for "{value}"
  • {:else} {#each results as item (item.name)}
  • {/each} {/if}
results {results.length} / {components.length}
trace {#if trace.length === 0} press Enter or clear the field to see events {:else} {#each trace.slice(0, 3) as entry} {entry.event} · {entry.family}{entry.intent ? ' · ' + entry.intent : ''} {fmtTime(entry.at)} {/each} {/if} value {isEmpty ? 'empty' : value} · onChange {lastValueChange} {#if lastValueChangeAt !== null} {fmtTime(lastValueChangeAt)} {/if} · last {lastSubmit}
{#if tab === 'live'}

Controls

soma owns value, clear and submit. eidos owns visual treatment.

soma props · search behavior
{#each ['clearOnEscape', 'disabled', 'readonly', 'required', 'invalid', 'loading'] as flag} {/each}
eidos props · visual treatment
soma headless · search behavior svelte
{somaSnippet}
eidos visual · size, variant and intent color svelte
{eidosSnippet}
{/if} {#if tab === 'api'}

API + reference comparison

FeatureAirRadixBitsArkReact AriaUIXDecision
Native search input❌❌❌⚠️✅✅Soma owns `type="search"` and `role="searchbox"`.
Clear trigger❌❌❌⚠️✅✅Covered with translated label and disabled state.
Escape clears❌❌❌⚠️✅✅Covered via `clearOnEscape`.
Submit on Enter❌❌❌⚠️✅✅Covered with `commit-submit` event.
Field state integration⚠️✅⚠️✅✅✅UIX delegates label/error/description to Field.
PropOwnerDefaultNotes
valuesoma''Bindable search text
onValueChangesomanoopLive filtering path
onSubmitsomanoopEnter key path
onClearsomanoopClear trigger / Escape path
clearOnEscapesomatrueEscape clears the input
disabled / readonly / invalidsomafalseField integration flags
sizeeidosmdsm | md | lg
varianteidossurfacesurface | outline | ghost.
coloreidosprimaryIntent palette for focus and clear trigger hover.
{/if} {#if tab === 'morfo'}

Morfo contract

{#each partsList as part} {/each}
PartMarkerElementRoleOptional
{part.kebab} [{part.marker}] <{part.defaultElement}> {part.role ?? '—'} {part.optional ? 'yes' : 'no'}
Keyboard
{#each (searchFieldMorfo.parts.find((p) => p.kebab === 'input')?.keyboard) ?? [] as key} {/each}
KeyAction
{key.key}{key.action}
{/if} {#if tab === 'sema'}

sema · events + perceptual signature

SearchField splits submit and reset so Enter and Clear/Escape can carry different perceptual hooks while the value mutation remains owned by Soma.

{#each events as action} {/each}
NameFamilyVerbSequenceTargetPlay
{action.name} {action.semantic.family} {action.semantic.verb ?? '—'} {action.semantic.sequence ?? 'pre'} {action.target}
{/if} {#if tab === 'recipe'}

Eidos recipe

Selectors live in src/uix/eidos/components/search-field/search-field.css and consume Soma empty/focus state plus Eidos data-size, data-variant and data-color.

SelectorOwnerPurpose
[data-search-field] morfo Root search composition shell.
[data-search-field][data-size][data-variant][data-color] eidos Visual scale, input treatment and intent palette.
[data-search-field-input][data-empty][data-focus][data-invalid] morfo Search input state surfaced by Soma.
[data-search-field-clear-trigger] morfo Clear action affordance and disabled state.
[data-search-field][data-event] eidos Transient perceptual event styling from Sema projection.
{/if} {#if tab === 'a11y'}

Accessibility

ConcernContract
RoleInput uses role="searchbox" and type="search".
LabelInput receives translated label unless a Field label wins.
KeyboardEnter submits; Escape clears when enabled.
ClearClear trigger restores focus to the input.
{/if}