Home

Awesome

PINView.Maui (.NET Maui UI control)

PINView is .NET Maui cross platform UI control to facilitate UI for mobile PIN (MPIN), OTP or Verification Code entry. This control can be used for Login using PIN, Creting New PIN, Change PIN, Entering secure OTP screens in your mobile application.

<kbd> <img src="https://github.com/MGohil/PINView.Maui/blob/master/arts/Preview-Graphic.png" width="800"> </kbd>

<br><br> If you are happy using this control and feeling generous, consider buying me a Coffee. :grinning:

Donate

Nuget Package

https://www.nuget.org/packages/PINView.Maui/

Platforms Supported

Steps

  1. Search for PINView.Maui nuget package and install it in your .NET Maui project.
  2. In your Page, add reference to this package: xmlns:pinview="clr-namespace:PINView.Maui;assembly=PINView.Maui"
  3. Use the control like below:
<pinview:PINView
    BoxBackgroundColor="#FEDBD0"
    BoxShape="Circle"
    PINLength="5"
    PINValue="{Binding PIN}"
    Color="#442C2E" />

Properties Definitions

PropertyTypeDefaultDescription
AutoDismissKeyboardBooleanFalseDecides whether to dismiss the keyboard automatically when all characters entered
BoxBackgroundColorColorTransparentDefines the BackgroundColor of each PIN Box
BoxBorderColorColorColor Property ValueDefines the Border Color of each PIN Box
BoxBorderThicknessdouble1.0Sets the Thickness of Border of each PinBoxes
BoxFocusColorColorBlackDefines the Focus Indicator Border Color when PIN Box is Focused
BoxFocusAnimationEnumNoneAnimates the Box when it receives the Focus. Enum values [ None, ZoomInOut, ScaleUp ]
BoxShapeEnumCircleDefines the shape of PIN Box from Enum values [ Square, RoundCorner, Circle ]
BoxSizeDouble50Defines the Width and Height of each PIN Box
BoxSpacingDouble5Defines the space among each PIN Box
ColorColorAccentDefines the Color of PIN Box (Border and Dot)
DotSizedouble20.0Sets the Dot size of each Dots in PinBoxes
FontSizedouble20.0Sets the Font size of each char Label in PinBoxes
FontAttributesFontAttributesNoneSets the FontAttributes of the Char label in each box. Applicable when IsPassword = False
FontFamilystringSystem FontSets the FontFamily of the Char label in each box. Applicable when IsPassword = False
IsPasswordBooleanFalseDefines whether to show actual input character or hide / secure via Dot
PINInputTypeEnumNumericDefines the Input Type from Enum [ Numeric, AlphaNumeric ]
PINLengthInteger4Defines the Length (No. of Characters) of the PIN
PINValueStringEmptyBind this to string Property in your ViewModel, to get value of the Entered PIN

Commands / Events Definitions

Command / EventTypeDescription
PINEntryCompletedCommandCommandA Bindable Command, which gets invoked on completion of the PIN entry (All characters are entered) You can execute your code through this command
PINEntryCompletedEventInvokes on completion of the PIN entry (when all characters are entered).