{"repo":"Fawxy/CBPinEntryView","free":true,"listed":false,"github":"https://github.com/Fawxy/CBPinEntryView","clone":"git clone https://github.com/Fawxy/CBPinEntryView.git","description":"A SwiftUI view for entering pins, one-time codes, or passwords — accessible and autofill-ready.","language":"Swift","stars":187,"topics":["ios","otp","pin-entry","spm","swift","swiftui"],"license":"MIT","category":"mobile-apps","readme_excerpt":"CBPinEntryView A SwiftUI view for entering pins, one-time codes, or passwords — backspace, paste, and .oneTimeCode autofill all work correctly out of the box, with first-class accessibility (VoiceOver progress announcements, Dynamic Type, no colour-only states). Requirements - iOS 16.0+ - Swift 5.9+ - No external dependencies Installation Swift Package Manager only: Upgrading from 1.x? CBPinEntryView 2.0 is a SwiftUI-only rewrite with no UIKit compatibility shim. See MIGRATION.md. Usage pin is the single source of truth — read it directly, no getPinAsString() needed. Set pin = \"\" to clear. Configuration Behavioural configuration is applied via pin -prefixed modifiers, not the standard SwiftUI ones (see \"Why pin -prefixed modifiers?\" below): Custom cell rendering The library ships one default cell ( DefaultPinEntryCell ) but imposes no particular look. Pass your own @ViewBuilder closure over PinEntryCellState : PinEntryCellState is already masked when secure — a custom cell never sees the raw digit in secure mode. Why pin -prefixed modifiers? A wrapper view can't give a propagating standard modifier ( .keyboardType , .textContentType , .textInputAutocapitalization ) an overridable default: SwiftUI's environment resolves closest-to-the-field-wins, and the field inside PinEntryView is always closer than anything wrapped around it. Applying the standard modifier outside PinEntryView would silently do nothing. The pin -prefixed modifiers avoid that footgun — apply them directly on","default_branch":null,"files":null,"tree":[],"storefront":"/r/Fawxy","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Fawxy/CBPinEntryView/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}