Releases: huyparody/OTPTextField
Releases · huyparody/OTPTextField
Release list
1.0.3
[1.0.3] - 2025-06-12
Changed
- Refactored
OTPTextFieldto handle.invalidstate change separately via.onChange(of: typingState)instead of mixing it inside.onChange(of: text).
This improves code clarity and avoids potential side effects whentypingStatechanges independently from the text input.
1.0.2
[1.0.2] - 2025-06-12
- 🔧 Removed
textFieldWidthoption fromOTPTextFieldOptions.
This decision was made to better support adaptive layouts by allowing each text field to automatically expand and fill the available horizontal space based on the number of digits and spacing. Fixed-width fields were limiting flexibility, especially on devices with varying screen sizes. - Removed unused initializer.
1.0.1
[1.0.1] - 2025-06-12
1.0.1
- 🔧 Removed
textFieldWidthoption fromOTPTextFieldOptions.
This decision was made to better support adaptive layouts by allowing each text field to automatically expand and fill the available horizontal space based on the number of digits and spacing. Fixed-width fields were limiting flexibility, especially on devices with varying screen sizes.
1.0.0
[1.0.0] - 2025-06-12
Added
OTPTextFieldcomponent for customizable OTP input UI.- Support for two styles:
.underlined.roundedBorder
OTPTextFieldOptionsto allow customization (colors, spacing, font, etc.).- Binding to
@State var text: Stringand@State var typingState: TypingStateto control and observe input. - Invalid input animation trigger via external
.invalidstate. - Callback
onCompletewhen full OTP is entered. - Hidden internal
TextFieldfor native iOS OTP auto-fill support. - Support for SwiftUI
@FocusStateto manage focus state cleanly.