This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
SecureField
用于密码输入的 SwiftUI SecureField 组件。
iOS
tvOS
Included in Expo Go
Recommended version:
~58.0.15
Expo UI SecureField 与官方 SwiftUI SecureField API 相匹配,并提供一个文本字段,用于掩盖用户输入的密码和其他敏感文本。
🌐 Expo UI SecureField matches the official SwiftUI SecureField API and provides a text field that masks user input for passwords and other sensitive text.
import{ useState }from'react';import{Host,SecureField}from'@expo/ui/swift-ui';exportdefaultfunctionBasicSecureFieldExample(){const[password, setPassword]=useState('');// A secure field stretches to the width it is given, so give the host a size.return(<Hoststyle={{ flex:1}}><SecureFieldplaceholder="Password"onTextChange={setPassword}/></Host>);}