Class
TelerikSvgIcon

Renders a Telerik SVG icon or custom SVG markup. Provide a predefined icon via ISvgIcon in Icon (preferred), or custom SVG through ChildContent. See Icons documentation for usage and icon lists.

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Syntax:

cs-api-definition
public class TelerikSvgIcon : IconBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Inheritance: objectComponentBaseBaseComponentIconBaseTelerikSvgIcon

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members IconBase.FlipIconBase.ThemeColorIconBase.SizeBaseComponent.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.OnParametersSetAsync()ComponentBase.OnAfterRender(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)ComponentBase.DispatchExceptionAsync(Exception)ComponentBase.SetParametersAsync(ParameterView)

Constructors

TelerikSvgIcon()

Declaration

cs-api-definition
public TelerikSvgIcon()

Properties

ChildContent

Defines the child content of the component. Use to render custom svg markup.

Declaration

cs-api-definition
[Parameter]
public RenderFragment ChildContent { get; set; }

Property Value

RenderFragment

Icon

Specifies a predefined Telerik icon to be rendered. Takes precedence over custom icons defined within ChildContent. Refer to SvgIcon Documentation for more information.

Declaration

cs-api-definition
[Parameter]
public ISvgIcon Icon { get; set; }

Property Value

ISvgIcon

Variant

Specifies the icon variant to render (e.g., solid, outline, duotone). When set, the component renders the SVG content from the matching variant entry in the icon definition. Falls back to the default icon content if the variant is not found or the icon has no variants.

Declaration

cs-api-definition
[Parameter]
public string Variant { get; set; }

Property Value

string

Methods

BuildRenderTree(RenderTreeBuilder)

Declaration

cs-api-definition
protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder

RenderTreeBuilder

Overrides ComponentBase.BuildRenderTree(RenderTreeBuilder)

OnParametersSet()

Declaration

cs-api-definition
protected override void OnParametersSet()

Overrides ComponentBase.OnParametersSet()

ThrowIfNoIconIsProvided()

Declaration

cs-api-definition
public void ThrowIfNoIconIsProvided()