Components
SecureField
SecureField is a control that displays a secure text input field. SecureField is used for password input and other sensitive information, automatically masking the input.
SecureField is a control that displays a secure text input field. SecureField is used for password input and other sensitive information, automatically masking the input.
Examples
Basic Usage
Preview unavailable for this example in the static docs build.
Show code
<VStack spacing={16}>
<SecureField placeholder="Enter password" />
<SecureField placeholder="Disabled field" disabled />
</VStack>API
This component currently relies on inherited element props.
Inherits additional props from Omit<ITextFieldProps, 'type'>.
Overview
SecureField is a control that displays a secure text input field. SecureField is used for password input and other sensitive information, automatically masking the input.
SwiftUI Correspondence: Similar to SwiftUI's SecureField.
Notes
- SecureField automatically masks input for security
- SecureField supports controlled and uncontrolled modes
- Use
valueandonChangefor controlled inputs - SecureField can be disabled with the
disabledprop - Use
placeholderto provide hints about expected input
Best Practices
- Security: Always use SecureField for password inputs
- Validation: Validate password strength and requirements
- Placeholders: Provide clear placeholder text
- Accessibility: Ensure SecureField is accessible
- Mobile: Test on mobile devices for proper keyboard behavior