RadzenPassword Class

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

Implements

IComponent

IHandleEvent

IHandleAfterRender

IRadzenFormComponent

Inherited Members

FormComponentWithAutoComplete<string>.SetParametersAsync

FormComponentWithAutoComplete<string>.AutoCompleteType

FormComponentWithAutoComplete<string>.AutoCompleteAttribute

FormComponentWithAutoComplete<string>.DefaultAriaAutoCompleteAttribute

FormComponentWithAutoComplete<string>.AriaAutoCompleteAttribute

FormComponent<string>.Dispose

FormComponent<string>.GetValue

FormComponent<string>.OnContextMenu

FormComponent<string>.GetClassList

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

FormComponent<string>._value

RadzenComponent.OnMouseEnter

RadzenComponent.OnMouseLeave

RadzenComponent.GetCssClass

RadzenComponent.Debounce

RadzenComponent.OnInitialized

RadzenComponent.OnAfterRenderAsync

RadzenComponent.RaiseContextMenu

RadzenComponent.RaiseMouseEnter

RadzenComponent.AddContextMenu

RadzenComponent.RaiseMouseLeave

RadzenComponent.OnBecameInvisible

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

ComponentBase.InvokeAsync

ComponentBase.DispatchExceptionAsync

ComponentBase.RendererInfo

ComponentBase.Assets

ComponentBase.AssignedRenderMode

Namespace: Radzen.Blazor

Assembly: Radzen.Blazor.dll

Syntax

public class RadzenPassword : FormComponentWithAutoComplete<string>, IComponent, IHandleEvent, IHandleAfterRender, 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

RadzenPasswordlink

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()

Properties

DefaultAutoCompleteAttributelink

Declaration
public string DefaultAutoCompleteAttribute { get; set; }
Property Value
Type Description
string

Immediatelink

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
public bool Immediate { get; set; }
Property Value
Type Description
boolGets 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.

ReadOnlylink

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
public bool ReadOnly { get; set; }
Property Value
Type Description
boolGets 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.

Methods

BuildRenderTreelink

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

GetComponentCssClasslink

Declaration
protected override string GetComponentCssClass()
Returns
Type Description
string

GetIdlink

Declaration
protected override string GetId()
Returns
Type Description
string

OnChangelink

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
An error has occurred. This app may no longer respond until reloaded. Reload 🗙