Table of Contents

Class BOBBadge

Namespace
BlazOrbit.Components
Assembly
BlazOrbit.dll
[GenerateComponentInfo]
public class BOBBadge : BOBVariantComponentBase<BOBBadge, BOBBadgeVariant>, IVariantComponent<BOBBadgeVariant>, IVariantComponent, IPureBuiltComponent, IBuiltComponent, IHasSize, IHasColor, IHasBackgroundColor, IHasBorder, IHasShadow
Inheritance
object
ComponentBase
BOBBadge
Implements
Inherited Members

Constructors

BOBBadge()

public BOBBadge()

Properties

BackgroundColor

Background color of the badge. Accepts any valid CSS color value, PaletteColor or BOBColor.

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

Property Value

string

Border

Border style applied to the badge.

[Parameter]
public BorderStyle? Border { get; set; }

Property Value

BorderStyle

BuiltInTemplates

Compile-time map of variants to their built-in render templates.

protected override Dictionary<BOBBadgeVariant, Func<BOBBadge, RenderFragment>> BuiltInTemplates { get; }

Property Value

Dictionary<BOBBadgeVariant, Func<BOBBadge, RenderFragment>>

ChildContent

Content rendered inside the badge (typically a number or short label).

[Parameter]
public RenderFragment? ChildContent { get; set; }

Property Value

RenderFragment

Circular

When true, the badge is forced to a circular shape; otherwise it adapts to its content.

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

Property Value

bool

Color

Text color of the badge. 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 BOBBadgeVariant DefaultVariant { get; }

Property Value

BOBBadgeVariant

Shadow

Shadow style applied to the badge.

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

Property Value

ShadowStyle

Size

Visual size of the badge.

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

Property Value

BOBSize

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