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

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:

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

C#
public TelerikSvgIcon()

Methods

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

Overrides: ComponentBase.BuildRenderTree(RenderTreeBuilder)

C#
protected override void OnParametersSet()

Overrides: ComponentBase.OnParametersSet()

C#
public void ThrowIfNoIconIsProvided()

Properties

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

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

Icon

ISvgIcon

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

C#
[Parameter]
public ISvgIcon Icon { get; set; }

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.

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