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>.NotifyFieldChanged

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.Localize

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.UICulture

RadzenComponent.DefaultUICulture

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 to this section

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 to this section

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

ImmediateLink to this section

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.

InputSizeLink to this section

Gets or sets the size of the component.

Declaration
public InputSize InputSize { get; set; }
Property Value
Type Description
InputSizeGets or sets the size of the component.

ReadOnlyLink to this section

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 to this section

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

GetComponentCssClassLink to this section

Declaration
protected override string GetComponentCssClass()
Returns
Type Description
string

GetIdLink to this section

Declaration
protected override string GetId()
Returns
Type Description
string

SetValueLink to this section

Handles the @bind:set binding of the underlying input element.

Declaration
protected Task SetValue(string value)
Parameters
Type Name Description
string value The new value reported by the input/change event.
Returns
Type Description
Task
An error has occurred. This app may no longer respond until reloaded. Reload 🗙