Table of Contents

Class BOBInputColor

Namespace
BlazOrbit.Components.Forms
Assembly
BlazOrbit.dll
[GenerateComponentInfo]
public class BOBInputColor : BOBInputComponentBase<CssColor, BOBInputColor, BOBInputVariant>, IHasReadOnly, IHasDisabled, IHasRequired, IHasError, IVariantComponent<BOBInputVariant>, IVariantComponent, IBuiltComponent, IHasSize, IHasLoading, IHasShadow, IHasColor, IHasBackgroundColor, IHasPrefix, IHasSuffix, IInputFamilyComponent
Inheritance
object
ComponentBase
InputBase<CssColor>
BOBInputColor
Implements
Inherited Members

Constructors

BOBInputColor()

public BOBInputColor()

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

protected override IReadOnlyDictionary<BOBInputVariant, Func<BOBInputColor, RenderFragment>> BuiltInTemplates { get; }

Property Value

IReadOnlyDictionary<BOBInputVariant, Func<BOBInputColor, RenderFragment>>

Clearable

When true, a clear button reverts the value to null.

[Parameter]
public bool Clearable { get; set; }

Property Value

bool

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

Default variant used when no explicit variant is specified.

public override BOBInputVariant DefaultVariant { get; }

Property Value

BOBInputVariant

DisplayMode

Layout used to expose the color editor: dropdown, popover, or inline panel.

[Parameter]
public ColorPickerDisplayMode DisplayMode { get; set; }

Property Value

ColorPickerDisplayMode

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

Variant of the loading indicator shown when Loading is true.

[Parameter]
public BOBProgressIconVariant LoadingIndicatorVariant { get; set; }

Property Value

BOBProgressIconVariant

OutputFormat

String format used to serialize the picked color (hex, rgb(a), hsl(a), etc.).

[Parameter]
public ColorOutputFormats OutputFormat { get; set; }

Property Value

ColorOutputFormats

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

IconKey?

PrefixText

Text displayed before the input value.

[Parameter]
public string? PrefixText { get; set; }

Property Value

string

RevertText

Text displayed as the Revert.

[Parameter]
public string RevertText { get; set; }

Property Value

string

Shadow

Shadow style applied to the input container.

[Parameter]
public ShadowStyle? Shadow { get; set; }

Property Value

ShadowStyle

ShowCopyButton

When true, the CopyButton is shown.

[Parameter]
public bool ShowCopyButton { get; set; }

Property Value

bool

Size

Visual size of the input.

[Parameter]
public BOBSize Size { get; set; }

Property Value

BOBSize

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

IconKey?

SuffixText

Text displayed after the input value.

[Parameter]
public string? SuffixText { get; set; }

Property Value

string

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

cssVariables Dictionary<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

dataAttributes Dictionary<string, object>

BuildRenderTree(RenderTreeBuilder)

Renders the component to the supplied Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder.

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder

OnInitialized()

Method invoked when the component is ready to start, having received its initial parameters from its parent in the render tree.

protected override void OnInitialized()

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 CssColor, out string)

Parses a string to create an instance of CssColor. 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 CssColor result, out string validationErrorMessage)

Parameters

value string

The string value to be parsed.

result CssColor

An instance of CssColor.

validationErrorMessage string

If the value could not be parsed, provides a validation error message.

Returns

bool

True if the value could be parsed; otherwise false.