AurumSearchField

Aurum's search box — a pill-shaped AurumTextField with the canonical leading magnifier and an optional clear affordance.

familyFields
platformiOS 17+ · SwiftUI
sourceSources/Aurum/Component/Field/AurumSearchField.swift
snapshots1 baselines · iPhone 17 Pro · iOS 26.5

Aurum's search box — a pill-shaped AurumTextField with the canonical leading magnifier and an optional clear affordance. The SwiftUI port of aurum-android's AurumSearchField.

Intended use

Use as the single search entry point on a list or directory surface. The pill shape + leading magnifier glyph is the canonical "search" affordance — users recognise it instantly. For filtering by category use a row of AurumChips instead; for free-form text input use AurumTextField.

Do

  • Wire the binding to a debounced query (250–400 ms) — search-as-you-type without flooding the backend.
  • Provide onClear whenever the search has any state worth clearing — users expect the X to wipe the query and reset results.
  • Anchor at the top of the scrollable surface; sticky-on-scroll if the list is long.

Don’t

  • Use as a generic single-line input — the pill shape signals search semantics; reusing it for unrelated text confuses users.
  • Submit on return without also surfacing real-time results; users expect search to feel live.
  • Stack two AurumSearchFields on the same surface — there should be one search context at a time.

Snapshots

Recorded on the pinned simulator — iPhone 17 Pro · iOS 26.5 · Xcode 26.6.

AurumSearchField — FieldSnapshotTests · testSearchField
FieldSnapshotTests · testSearchField