Class BOBInputTextArea
- Namespace
- BlazOrbit.Components.Forms
- Assembly
- BlazOrbit.dll
[GenerateComponentInfo]
public class BOBInputTextArea : BOBInputComponentBase<string, BOBInputTextArea, BOBInputVariant>, IHasReadOnly, IHasDisabled, IHasRequired, IHasError, IVariantComponent<BOBInputVariant>, IVariantComponent, IBuiltComponent, IHasSize, IHasLoading, IHasDensity, IHasShadow, IHasColor, IHasBackgroundColor, IHasPrefix, IHasSuffix, IInputFamilyComponent
- Inheritance
-
objectComponentBaseInputBase<string>BOBInputComponentBase<string>BOBInputTextArea
- Implements
- Inherited Members
Constructors
BOBInputTextArea()
public BOBInputTextArea()
Properties
AutoResize
When true, the textarea grows vertically as content is added.
[Parameter]
public bool AutoResize { get; set; }
Property Value
- bool
BackgroundColor
Background color of the textarea. Accepts any valid CSS color value, PaletteColor or BOBColor.
[Parameter]
public string? BackgroundColor { get; set; }
Property Value
- string
BuiltInTemplates
protected override IReadOnlyDictionary<BOBInputVariant, Func<BOBInputTextArea, RenderFragment>> BuiltInTemplates { get; }
Property Value
- IReadOnlyDictionary<BOBInputVariant, Func<BOBInputTextArea, RenderFragment>>
Color
Text color of the textarea. Accepts any valid CSS color value, PaletteColor or BOBColor.
[Parameter]
public string? Color { get; set; }
Property Value
- string
DefaultVariant
Default variant used when no explicit variant is specified.
public override BOBInputVariant DefaultVariant { get; }
Property Value
Density
Vertical density (gap) of the textarea.
[Parameter]
public BOBDensity Density { get; set; }
Property Value
HelperText
Helper text displayed below the component for additional context.
[Parameter]
public string? HelperText { get; set; }
Property Value
- string
Label
Floating label displayed above the textarea when it has a value or focus.
[Parameter]
public string? Label { get; set; }
Property Value
- string
Loading
When true, the textarea shows a loading indicator.
[Parameter]
public bool Loading { get; set; }
Property Value
- bool
LoadingIndicatorVariant
[Parameter]
public BOBProgressIconVariant LoadingIndicatorVariant { get; set; }
Property Value
MaxLength
Browser-enforced character cap, emitted as the maxlength HTML attribute.
UI hint only — a malicious client (devtools, direct fetch, modified WASM) can
bypass it. Always re-validate on the server before persisting the value.
[Parameter]
public int? MaxLength { 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. When
greater than 0, the callback fires after this many milliseconds of
keyboard inactivity, coalescing burst keystrokes into a single invocation.
0 disables debouncing (default). UpdateOnInput is
unaffected: when enabled, the bound Microsoft.AspNetCore.Components.Forms.InputBase<TValue>.Value
still propagates immediately per keystroke.
[Parameter]
public int OnInputDebounceMs { get; set; }
Property Value
- int
Placeholder
Placeholder text shown when the component is empty.
[Parameter]
public string? Placeholder { get; set; }
Property Value
- string
PrefixBackgroundColor
PrefixBackground color. Accepts any valid CSS color value, PaletteColor or BOBColor.
[Parameter]
public string? PrefixBackgroundColor { get; set; }
Property Value
- string
PrefixColor
Prefix color. Accepts any valid CSS color value, PaletteColor or BOBColor.
[Parameter]
public string? PrefixColor { get; set; }
Property Value
- string
PrefixIcon
Material icon name for the Prefix.
[Parameter]
public IconKey? PrefixIcon { get; set; }
Property Value
PrefixText
Text displayed before the textarea value.
[Parameter]
public string? PrefixText { get; set; }
Property Value
- string
Resize
Direction the user is allowed to resize the textarea via the corner grip.
[Parameter]
public TextAreaResize Resize { get; set; }
Property Value
Rows
Number of visible text rows.
[Parameter]
public int Rows { get; set; }
Property Value
- int
Shadow
Shadow style applied to the textarea container.
[Parameter]
public ShadowStyle? Shadow { get; set; }
Property Value
Size
Visual size of the textarea.
[Parameter]
public BOBSize Size { get; set; }
Property Value
SuffixBackgroundColor
SuffixBackground color. Accepts any valid CSS color value, PaletteColor or BOBColor.
[Parameter]
public string? SuffixBackgroundColor { get; set; }
Property Value
- string
SuffixColor
Suffix color. Accepts any valid CSS color value, PaletteColor or BOBColor.
[Parameter]
public string? SuffixColor { get; set; }
Property Value
- string
SuffixIcon
Material icon name for the Suffix.
[Parameter]
public IconKey? SuffixIcon { get; set; }
Property Value
SuffixText
Text displayed after the textarea value.
[Parameter]
public string? SuffixText { get; set; }
Property Value
- string
UpdateOnInput
When true, the bound value updates on every keystroke instead of 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.
OnAfterRenderAsync(bool)
Method invoked after each time the component has been rendered interactively and the UI has finished updating (for example, after elements have been added to the browser DOM). Any Microsoft.AspNetCore.Components.ElementReference fields will be populated by the time this runs.
This method is not invoked during prerendering or server-side rendering, because those processes are not attached to any live browser DOM and are already complete before the DOM is updated.
Note that the component does not automatically re-render after the completion of any returned System.Threading.Tasks.Task, because that would cause an infinite render loop.
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
firstRenderboolSet to
trueif this is the first time Microsoft.AspNetCore.Components.ComponentBase.OnAfterRender(bool) has been invoked on this component instance; otherwisefalse.
Returns
- Task
A System.Threading.Tasks.Task representing any asynchronous operation.
Remarks
The Microsoft.AspNetCore.Components.ComponentBase.OnAfterRender(bool) and Microsoft.AspNetCore.Components.ComponentBase.OnAfterRenderAsync(bool) lifecycle methods
are useful for performing interop, or interacting with values received from @ref.
Use the firstRender parameter to ensure that initialization work is only performed
once.
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.