Skip to main content
161

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Apple docs
FormsApple

Search field

Filter native content with a density-aware search field and clear action.

Public APILumenSearchFieldApple / SwiftUISwift product: LumenUI

Apple availability

Supported native targets

Import LumenUI in the target that uses this component. iPad support follows the iOS package baseline and uses native iPad layout behavior.

iPhone · iOS 16+iPad · iPadOS 16+Mac · macOS 13+Apple Vision · visionOS 1+

Native example

Use Search field

Use for filtering an existing collection. Keep search results and empty states close to the field so focus changes remain understandable.

Search field rendered in the iPhone simulator Lumen playground
Verified runtime captureiPhone simulator
swift
LumenSearchField("Search workspaces", text: $query)

Reference

Public API

The primary shared and platform-specific options exposed by LumenSearchField.

APIValues or typeDefaultDescription
promptStringSearchProvides placeholder and field context.
textBinding<String>RequiredStores the current search query.
Binding setter(String) -> UnitRequiredUpdates the controlled query.
isEnabledBooleantrueControls native disabled presentation.
clearLabelStringClear searchNames the clear action.

Native behavior

Design and accessibility

When to use it

Use for filtering an existing collection. Keep search results and empty states close to the field so focus changes remain understandable.

Accessibility

The field uses native text input and provides a labeled clear button whenever text is present.

Shared component

Available on other platforms

React NativeAndroid / Compose
Apple docsSwiftUI package