         let showsPlaceholder = state?.showsPlaceholder == true
         
         for (i, button) in buttons.enumerated() {
-            button.layer.borderColor = UIColor.lightGray.cgColor
 
             if let newCharacter = textField.text?[i],
                 newCharacter != "" {
                 button.setTitle(newCharacter, for: .normal)
                 button.setTitleColor(.black, for: .normal)
+                button.layer.borderColor = (state?.completedBorderColor ?? .lightGray).cgColor
             }
             else {
                 button.setTitle(showsPlaceholder ? state?.pin?.uppercased()[i] : nil, for: .normal)

        public var allowsBackspace: Bool
        public var showsPlaceholder: Bool
        public var allowsAllCharacters: Bool
        
        public init(pin: String?,
                    allowsBackspace: Bool = true,
                    showsPlaceholder: Bool = true,
                    allowsAllCharacters: Bool = true) {
            self.pin = pin
            self.allowsBackspace = allowsBackspace
            self.showsPlaceholder = showsPlaceholder
            self.allowsAllCharacters = allowsAllCharacters
        }
    }
    

    @objc @IBInspectable fileprivate var allowsBackspace: Bool = false
    @objc @IBInspectable fileprivate var showsPlaceholder: Bool = true
    @objc @IBInspectable fileprivate var allowsAllCharacters: Bool = false
    @objc @IBInspectable fileprivate var completedBorderColor: UIColor = .green
    
    override public init(frame: CGRect) {
        super.init(frame: frame)
