Search This Blog

Monday 29 November 2021

Xamarin Form OTP Control

OTP Entry Control For Xamarin Forms

Otp Entry Control - is a cross-platform plugin for Xamairn Forms that allows you to enter specified length otp.

image


How To Use

Available on Nuget : https://www.nuget.org/packages/OTPEntryControl/1.0.4
Install this Plugin in your Xamarin Form Project.

Github : https://github.com/mistrypragnesh40/OTPControl

Youtube : https://youtu.be/pdA45xF2G_U

Implementation Example

namespace : xmlns:otpcontrol="clr-namespace:OTPControl;assembly=OTPControl"

<StackLayout>
    <Frame BackgroundColor="#2196F3" Padding="24" CornerRadius="0">
        <Label Text="Welcome to Xamarin.Forms!" HorizontalTextAlignment="Center" TextColor="White" FontSize="36"/>
    </Frame>
    <Label Text="Start developing now" FontSize="Title" Padding="30,10,30,10"/>
   
    <otpcontrol:CustomOtpControl FillBorderColor="Orange" EmptyBorderColor="Gray"   OtpLength="4" HorizontalOptions="Center"  />
</StackLayout>

Property

  1. OtpLength: You can set the number like 4 digit or 6 digit.
  2. FillBorderColor: Entered Otp Tint Color.
  3. EmptyBorderColor: Default Border Color.
  4. SelectedOtp: This Property will return Entered Otp in Text Format.



6 comments:

  1. Can we have otp more than 6 digit?

    ReplyDelete
  2. I can increase the side of the code? for example in the entry I could using Size attribute, thansk

    ReplyDelete
  3. sorry, top length attribute , increases the number of entries, but do I need to increase the numeric text than goes there? is it possible to increase the size of the numbers?

    ReplyDelete
  4. for example in a normal entry with the FontSize property I can do

    ReplyDelete

Popular Posts