menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class OtpFocusInEventArgs - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class OtpFocusInEventArgs

    Provides data for the OnFocus event when an input field receives focus.

    Inheritance
    System.Object
    OtpFocusInEventArgs
    OtpFocusOutEventArgs
    Namespace: Syncfusion.Blazor.Inputs
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class OtpFocusInEventArgs : Object
    Remarks

    This class contains information about the focus event, including which field was focused, the current component value, and whether the focus was initiated by user interaction.

    Constructors

    OtpFocusInEventArgs()

    Declaration
    public OtpFocusInEventArgs()

    Properties

    Index

    Gets or sets the zero-based index of the input field that received focus.

    Declaration
    public int Index { get; set; }
    Property Value
    Type Description
    System.Int32

    An integer representing the position of the focused input field within the SfOtpInput component, where 0 is the first field and Length - 1 is the last field.

    Remarks

    This index corresponds to the visual position of the input field from left to right (or right to left in RTL layouts) and can be used to implement field-specific logic.

    IsInteracted

    Gets or sets a value indicating whether the focus event was triggered by direct user interaction.

    Declaration
    public bool IsInteracted { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if the focus was initiated by user interaction (mouse click, keyboard navigation, etc.); otherwise, false if triggered programmatically.

    Remarks

    This property helps distinguish between user-initiated focus events and programmatic focus calls, which can be useful for implementing different behaviors or analytics tracking.

    Value

    Gets or sets the current complete value of the SfOtpInput component.

    Declaration
    public string Value { get; set; }
    Property Value
    Type Description
    System.String

    A string representing the concatenated values from all input fields at the time of the focus event.

    Remarks

    This value represents the current state of the entire OTP input, not just the focused field. For number-type inputs, this will contain only numeric characters.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved