Table of Contents

Class BOBBadge

Namespace
BlazOrbit.Components
Assembly
BlazOrbit.dll
[GenerateComponentInfo]
public class BOBBadge : BOBVariantComponentBase<BOBBadge, BOBBadgeVariant>, IVariantComponent<BOBBadgeVariant>, IVariantComponent, 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.

[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

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.

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

Property Value

string

DefaultVariant

Default variant used when no explicit variant is specified.

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

BuildComponentDataAttributes(Dictionary<string, object>)

Override this method to add component-specific data attributes. Called during attribute building process.

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