Demos About Radzen
Search Results for

    Show / Hide Table of Contents

    Class RadzenPassword

    A password input component that masks entered characters for secure password entry with autocomplete support. RadzenPassword provides a styled password field with browser autocomplete integration for password managers. Displays entered characters as dots or asterisks to protect sensitive data from shoulder surfing, integrates with browser password managers by setting appropriate autocomplete attributes. Supports data binding, validation, placeholder text, and read-only mode for display purposes. Use within forms for login, registration, password change, or any scenario requiring secure text entry.

    Inheritance
    object
    ComponentBase
    RadzenComponent
    FormComponent<string>
    FormComponentWithAutoComplete<string>
    RadzenPassword
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    IRadzenFormComponent
    Inherited Members
    FormComponentWithAutoComplete<string>.SetParametersAsync(ParameterView)
    FormComponentWithAutoComplete<string>.AutoCompleteType
    FormComponentWithAutoComplete<string>.AutoCompleteAttribute
    FormComponentWithAutoComplete<string>.DefaultAriaAutoCompleteAttribute
    FormComponentWithAutoComplete<string>.AriaAutoCompleteAttribute
    FormComponent<string>._value
    FormComponent<string>.Dispose()
    FormComponent<string>.GetValue()
    FormComponent<string>.OnContextMenu(MouseEventArgs)
    FormComponent<string>.GetClassList(string)
    FormComponent<string>.FocusAsync()
    FormComponent<string>.Name
    FormComponent<string>.TabIndex
    FormComponent<string>.Placeholder
    FormComponent<string>.Disabled
    FormComponent<string>.EditContext
    FormComponent<string>.Form
    FormComponent<string>.ValueChanged
    FormComponent<string>.HasValue
    FormComponent<string>.IsBound
    FormComponent<string>.Value
    FormComponent<string>.Change
    FormComponent<string>.FieldIdentifier
    FormComponent<string>.ValueExpression
    FormComponent<string>.FormFieldContext
    FormComponent<string>.CurrentPlaceholder
    RadzenComponent.OnMouseEnter()
    RadzenComponent.OnMouseLeave()
    RadzenComponent.GetCssClass()
    RadzenComponent.Debounce(Func<Task>, int)
    RadzenComponent.OnInitialized()
    RadzenComponent.OnAfterRenderAsync(bool)
    RadzenComponent.RaiseContextMenu(MouseEventArgs)
    RadzenComponent.RaiseMouseEnter()
    RadzenComponent.AddContextMenu()
    RadzenComponent.RaiseMouseLeave()
    RadzenComponent.Attributes
    RadzenComponent.Element
    RadzenComponent.MouseEnter
    RadzenComponent.MouseLeave
    RadzenComponent.ContextMenu
    RadzenComponent.Culture
    RadzenComponent.DefaultCulture
    RadzenComponent.Style
    RadzenComponent.Visible
    RadzenComponent.UniqueID
    RadzenComponent.JSRuntime
    RadzenComponent.IsJSRuntimeAvailable
    RadzenComponent.Reference
    RadzenComponent.CurrentStyle
    ComponentBase.OnInitializedAsync()
    ComponentBase.OnParametersSet()
    ComponentBase.OnParametersSetAsync()
    ComponentBase.StateHasChanged()
    ComponentBase.ShouldRender()
    ComponentBase.OnAfterRender(bool)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.DispatchExceptionAsync(Exception)
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: Radzen.Blazor
    Assembly: Radzen.Blazor.dll
    Syntax
    public class RadzenPassword : FormComponentWithAutoComplete<string>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable, IRadzenFormComponent
    Examples

    Basic password input:

    <RadzenPassword @bind-Value=@password Placeholder="Enter password" />

    Password confirmation with validation:

    <RadzenTemplateForm Data=@model>
        <RadzenPassword Name="Password" @bind-Value=@model.Password Placeholder="Password" />
        <RadzenRequiredValidator Component="Password" Text="Password is required" />
        <RadzenPassword Name="ConfirmPassword" @bind-Value=@model.ConfirmPassword Placeholder="Confirm password" />
        <RadzenCompareValidator Value=@model.Password Component="ConfirmPassword" Text="Passwords must match" />
    </RadzenTemplateForm>

    Constructors

    RadzenPassword()

    A password input component that masks entered characters for secure password entry with autocomplete support. RadzenPassword provides a styled password field with browser autocomplete integration for password managers. Displays entered characters as dots or asterisks to protect sensitive data from shoulder surfing, integrates with browser password managers by setting appropriate autocomplete attributes. Supports data binding, validation, placeholder text, and read-only mode for display purposes. Use within forms for login, registration, password change, or any scenario requiring secure text entry.

    Declaration
    public RadzenPassword()
    Examples

    Basic password input:

    <RadzenPassword @bind-Value=@password Placeholder="Enter password" />

    Password confirmation with validation:

    <RadzenTemplateForm Data=@model>
        <RadzenPassword Name="Password" @bind-Value=@model.Password Placeholder="Password" />
        <RadzenRequiredValidator Component="Password" Text="Password is required" />
        <RadzenPassword Name="ConfirmPassword" @bind-Value=@model.ConfirmPassword Placeholder="Confirm password" />
        <RadzenCompareValidator Value=@model.Password Component="ConfirmPassword" Text="Passwords must match" />
    </RadzenTemplateForm>

    Properties

    DefaultAutoCompleteAttribute

    Gets or sets the default autocomplete attribute's string value.

    Declaration
    public override string DefaultAutoCompleteAttribute { get; set; }
    Property Value
    Type Description
    string
    Overrides
    FormComponentWithAutoComplete<string>.DefaultAutoCompleteAttribute

    Immediate

    Gets or sets whether the component should update the bound value immediately as the user types (oninput event), rather than waiting for the input to lose focus (onchange event). This enables real-time value updates but may trigger more frequent change events.

    Declaration
    [Parameter]
    public bool Immediate { get; set; }
    Property Value
    Type Description
    bool

    true for immediate updates; false for deferred updates. Default is false.

    ReadOnly

    Gets or sets whether the password input is read-only and cannot be edited. When true, displays the masked value (or placeholder) but prevents user input. Useful for displaying password field in view-only forms, though typically passwords are not displayed at all.

    Declaration
    [Parameter]
    public bool ReadOnly { get; set; }
    Property Value
    Type Description
    bool

    true if the input is read-only; otherwise, false. Default is false.

    Methods

    BuildRenderTree(RenderTreeBuilder)

    A password input component that masks entered characters for secure password entry with autocomplete support. RadzenPassword provides a styled password field with browser autocomplete integration for password managers. Displays entered characters as dots or asterisks to protect sensitive data from shoulder surfing, integrates with browser password managers by setting appropriate autocomplete attributes. Supports data binding, validation, placeholder text, and read-only mode for display purposes. Use within forms for login, registration, password change, or any scenario requiring secure text entry.

    Declaration
    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    Parameters
    Type Name Description
    RenderTreeBuilder __builder
    Overrides
    ComponentBase.BuildRenderTree(RenderTreeBuilder)

    GetComponentCssClass()

    Gets the component CSS class.

    Declaration
    protected override string GetComponentCssClass()
    Returns
    Type Description
    string
    Overrides
    RadzenComponent.GetComponentCssClass()

    GetId()

    Gets the unique identifier.

    Declaration
    protected override string GetId()
    Returns
    Type Description
    string

    Returns the id attribute (if specified) or generates a random one.

    Overrides
    RadzenComponent.GetId()

    OnChange(ChangeEventArgs)

    Handles the Change event.

    Declaration
    protected Task OnChange(ChangeEventArgs args)
    Parameters
    Type Name Description
    ChangeEventArgs args

    The ChangeEventArgs instance containing the event data.

    Returns
    Type Description
    Task

    Implements

    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    IRadzenFormComponent

    Introducing Radzen Blazor Studio

    Radzen Blazor Studio is a software development environment that empowers developers to design, build and deploy Blazor applications without the traditional hurdles. Write less code and get more done.

    Learn More

    Download Now
    Download Now
    In This Article
    Back to top Radzen Blazor Components, © 2018-2025 Radzen. Source Code licensed under MIT