New to Telerik UI for BlazorStart a free 30-day trial

A component that lets you display a small status or count indicator attached to a parent element. Supports edge/inline/inside/outside positioning, top/bottom and start/end alignment, size/rounded/fill mode/theme color options, optional cutout border, and custom child content.

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Syntax:

C#
public class TelerikBadge : BaseComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Inheritance: objectComponentBaseBaseComponentTelerikBadge

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members BaseComponent.ShouldRender()BaseComponent.OnInitializedAsync()BaseComponent.OnAfterRenderAsync(bool)BaseComponent.Dispose()BaseComponent.InitLocalizer()BaseComponent.ThrowIfParameterIsNull(object, string)BaseComponent.HaveOptionsChanged(IDictionary<string, object>, IDictionary<string, object>)BaseComponent.GetClassString(params string[])BaseComponent.InvokeAsync<T>(string, params object[])BaseComponent.InvokeAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidAsync(string, params object[])BaseComponent.InvokeVoidAsyncWithoutAwait(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidComponentMethodAsync(string, params object[])BaseComponent.InvokeComponentVoidMethodAsync(string, object)BaseComponent.InvokeDisposeAsync()BaseComponent.StateHasChanged()BaseComponent.RootComponentBaseComponent.ClassComponentBase.OnInitialized()ComponentBase.OnParametersSet()ComponentBase.OnParametersSetAsync()ComponentBase.OnAfterRender(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)ComponentBase.DispatchExceptionAsync(Exception)ComponentBase.SetParametersAsync(ParameterView)...

Constructors

C#
public TelerikBadge()

Methods

C#
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters:__builderRenderTreeBuilder

Overrides: ComponentBase.BuildRenderTree(RenderTreeBuilder)

Properties

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

Defines how the Badge component is filled. Valid values are: Flat Outline Solid.

C#
[Parameter]
public string? FillMode { get; set; }

Controls if the Badge will render on the left or the right side of the parent element. Valid values are: Start - The Badge renders on the left side of the parent element. End - The Badge renders on the right side of the parent element. By default, the Badge renders on the right side of the parent element.

C#
[Parameter]
public BadgeHorizontalAlign HorizontalAlign { get; set; }

Controls how the Badge positions in relation to its parent element. Valid values are: Edge - The center of the Badge displays on the edge of the parent element. Inline - The Badge is positioned according to the normal page content flow. Inside - The Badge is positioned entirely inside the parent element. Outside - The Badge is positioned entirely outside the parent element. By default, the center of the Badge displays on the edge of the parent element.

C#
[Parameter]
public BadgePosition Position { get; set; }

Defines how rounded the borders of the badge are. Valid values are: Small Medium Large Full.

C#
[Parameter]
public string? Rounded { get; set; }

Defines if a margin renders between the Badge and the parent element where they overlap.

C#
[Parameter]
public bool ShowCutoutBorder { get; set; }

Controls the size of the Badge component. Valid values are: Small Medium Large.

C#
[Parameter]
public string? Size { get; set; }

Defines the color of the Badge component.

C#
[Parameter]
public string? ThemeColor { get; set; }

Controls if the Badge will render above or below the parent element. Valid values are: Top - The Badge renders above the parent element. Bottom - The Badge renders below the parent element. By default, the Badge renders on top of the parent element.

C#
[Parameter]
public BadgeVerticalAlign VerticalAlign { get; set; }