Class BOBInputPassword
- Namespace
- BlazOrbit.Components.Forms
- Assembly
- BlazOrbit.dll
[GenerateComponentInfo]
public class BOBInputPassword : BOBInputComponentBase<string, BOBInputPassword, BOBInputVariant>, IHasReadOnly, IHasDisabled, IHasRequired, IHasError, IVariantComponent<BOBInputVariant>, IVariantComponent, IBuiltComponent, IHasSize, IHasLoading, IHasDensity, IHasShadow, IHasColor, IHasBackgroundColor, IHasPrefix, IHasSuffix, IInputFamilyComponent
- Inheritance
-
objectComponentBaseInputBase<string>BOBInputComponentBase<string>BOBInputPassword
- Implements
- Inherited Members
Constructors
BOBInputPassword()
public BOBInputPassword()
Properties
BackgroundColor
Background color of the input. Accepts any valid CSS color value, PaletteColor or BOBColor.
[Parameter]
public string? BackgroundColor { get; set; }
Property Value
- string
BuiltInTemplates
Compile-time map of variants to their built-in render templates.
protected override IReadOnlyDictionary<BOBInputVariant, Func<BOBInputPassword, RenderFragment>> BuiltInTemplates { get; }
Property Value
- IReadOnlyDictionary<BOBInputVariant, Func<BOBInputPassword, RenderFragment>>
Color
Text color of the input. Accepts any valid CSS color value, PaletteColor or BOBColor.
[Parameter]
public string? Color { get; set; }
Property Value
- string
DefaultVariant
Variant used when no Variant is supplied.
public override BOBInputVariant DefaultVariant { get; }
Property Value
Density
Vertical density (gap) of the input.
[Parameter]
public BOBDensity Density { get; set; }
Property Value
HelperText
Helper text displayed below the input for additional context.
[Parameter]
public string? HelperText { get; set; }
Property Value
- string
Label
Floating label displayed above the input when it has a value or focus.
[Parameter]
public string? Label { get; set; }
Property Value
- string
Loading
When true, the input shows a loading indicator.
[Parameter]
public bool Loading { get; set; }
Property Value
- bool
LoadingIndicatorVariant
[Parameter]
public BOBProgressIconVariant LoadingIndicatorVariant { get; set; }
Property Value
MinLength
Minimum length used by strength scoring. Defaults to 8.
[Parameter]
public int MinLength { get; set; }
Property Value
- int
OnInput
Raised on every keystroke when UpdateOnInput is enabled.
[Parameter]
public EventCallback<string> OnInput { get; set; }
Property Value
- EventCallback<string>
OnInputDebounceMs
Trailing-edge debounce delay applied to OnInput only. See OnInputDebounceMs.
[Parameter]
public int OnInputDebounceMs { get; set; }
Property Value
- int
OnStrengthChanged
Raised whenever the computed BOBPasswordStrength changes.
[Parameter]
public EventCallback<BOBPasswordStrength> OnStrengthChanged { get; set; }
Property Value
- EventCallback<BOBPasswordStrength>
Placeholder
Placeholder text shown when the input is empty.
[Parameter]
public string? Placeholder { get; set; }
Property Value
- string
PrefixBackgroundColor
Background color of the prefix area.
[Parameter]
public string? PrefixBackgroundColor { get; set; }
Property Value
- string
PrefixColor
Color of the prefix text or icon.
[Parameter]
public string? PrefixColor { get; set; }
Property Value
- string
PrefixIcon
Material icon name displayed before the input value.
[Parameter]
public IconKey? PrefixIcon { get; set; }
Property Value
PrefixText
Text displayed before the input value.
[Parameter]
public string? PrefixText { get; set; }
Property Value
- string
Shadow
Shadow style applied to the input container.
[Parameter]
public ShadowStyle? Shadow { get; set; }
Property Value
ShowStrengthMeter
When true, render an inline strength meter below the input.
[Parameter]
public bool ShowStrengthMeter { get; set; }
Property Value
- bool
ShowVisibilityToggle
When true (default), an eye-icon button toggles plaintext visibility.
[Parameter]
public bool ShowVisibilityToggle { get; set; }
Property Value
- bool
Size
Visual size of the input.
[Parameter]
public BOBSize Size { get; set; }
Property Value
StrengthFlags
Flags indicating which password strength requirements are enforced.
[Parameter]
public PasswordStrengthFlags StrengthFlags { get; set; }
Property Value
SuffixBackgroundColor
Background color of the suffix area.
[Parameter]
public string? SuffixBackgroundColor { get; set; }
Property Value
- string
SuffixColor
Color of the suffix text or icon.
[Parameter]
public string? SuffixColor { get; set; }
Property Value
- string
SuffixIcon
Material icon name displayed after the input value.
[Parameter]
public IconKey? SuffixIcon { get; set; }
Property Value
SuffixText
Text displayed after the input value (rendered before the visibility toggle when enabled).
[Parameter]
public string? SuffixText { get; set; }
Property Value
- string
UpdateOnInput
When true, the bound value is updated on every keystroke instead of only on blur.
[Parameter]
public bool UpdateOnInput { get; set; }
Property Value
- bool
Methods
BuildComponentCssVariables(Dictionary<string, string>)
Contributes additional CSS custom properties to the inline style attribute. Keys
that collide with framework-owned --bob-inline-* variables will be overwritten.
public void BuildComponentCssVariables(Dictionary<string, string> cssVariables)
Parameters
cssVariablesDictionary<string, string>
BuildComponentDataAttributes(Dictionary<string, object>)
Contributes additional data- attributes to the root element. Keys that collide
with framework-owned data-bob- attributes will be overwritten.
public void BuildComponentDataAttributes(Dictionary<string, object> dataAttributes)
Parameters
dataAttributesDictionary<string, object>
BuildRenderTree(RenderTreeBuilder)
Renders the component to the supplied Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder.
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builderRenderTreeBuilder
DisposeAsync()
Async disposal path. Blazor invokes this first when the component is unmounted because the type implements System.IAsyncDisposable; it tears down the JS-side behavior instance via BlazOrbit.Abstractions.BOBComponentPipeline.DisposeBehaviorAsync().
public override ValueTask DisposeAsync()
Returns
- ValueTask
Remarks
Both this method and Dispose(bool) run on disposal - Blazor calls
DisposeAsync for the async work and the framework's System.IDisposable
contract still invokes Dispose(true) afterward. The split is intentional:
async work (JS interop teardown) lives here, sync work (event unsubscribe) lives in
Dispose(true). Both set IsDisposed so derived components can
guard post-await continuations regardless of which path runs first.
OnParametersSet()
Method invoked when the component has received parameters from its parent in the render tree, and the incoming values have been assigned to properties.
protected override void OnParametersSet()
TryParseValueFromString(string?, out string, out string?)
Parses a string to create an instance of string. Derived classes can override this to change how Microsoft.AspNetCore.Components.Forms.InputBase<TValue>.CurrentValueAsString interprets incoming values.
protected override bool TryParseValueFromString(string? value, out string result, out string? validationErrorMessage)
Parameters
valuestringThe string value to be parsed.
resultstringAn instance of string.
validationErrorMessagestringIf the value could not be parsed, provides a validation error message.
Returns
- bool
True if the value could be parsed; otherwise false.