This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
SearchBar
用于搜索输入功能的 Jetpack Compose SearchBar 组件。
Expo UI SearchBar 与官方 Jetpack Compose Search API 相匹配,并提供支持占位文本和全屏展开搜索的搜索输入框。


安装
If you are installing this in an existing React Native app, make sure to install expo in your project.
用法
基本搜索栏
带占位文本的搜索栏
使用 SearchBar.Placeholder 子组件,在搜索框为空时显示提示文本。
API
import { SearchBar } from '@expo/ui/jetpack-compose';
Components
Type: React.Element<ExpandedFullScreenSearchBarProps>
ExpandedFullScreenSearchBar component for SearchBar. This component marks its children to be rendered in the expanded full-screen search bar.
Type: React.Element<PlaceholderProps>
Placeholder component for SearchBar. This component marks its children to be rendered in the placeholder slot.