     })
   }
 }
+
+private extension TextField {
+  /// Visibility icon based on isSecureTextEntry value.
+  var visibilityIcon: UIImage? {
+    return isSecureTextEntry ? visibilityIconOff : visibilityIconOn
+  }
+}

          return
        }
        
        v.image = self.isSecureTextEntry ? Icon.visibilityOff?.tint(with: v.tintColor.withAlphaComponent(0.54)) : Icon.visibility?.tint(with: v.tintColor.withAlphaComponent(0.54))
    })
  }
}

  /// A reference to the visibilityIconButton.
  open fileprivate(set) var visibilityIconButton: IconButton?
  
  /// Icon for visibilityIconButton when in the on state.
  open var visibilityIconOn = Icon.visibility {
    didSet {
      visibilityIconButton?.image = visibilityIcon
    }
  }
  
  /// Icon for visibilityIconButton when in the off state.
  open var visibilityIconOff = Icon.visibilityOff {
    didSet {
      visibilityIconButton?.image = visibilityIcon
    }
  }
  
  /// Enables the visibilityIconButton.
  @IBInspectable
  open var isVisibilityIconButtonEnabled: Bool {
