ClassTelerikSvgIcon
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:
public class TelerikSvgIcon : IconBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance: objectComponentBaseBaseComponentIconBaseTelerikSvgIcon
Implements:
Inherited Members
Constructors
TelerikSvgIcon()
Declaration
public TelerikSvgIcon()
Properties
ChildContent
Defines the child content of the component. Use to render custom svg markup.
Declaration
[Parameter]
public RenderFragment ChildContent { get; set; }
Property Value
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
[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.
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
Overrides
OnParametersSet()
Declaration
protected override void OnParametersSet()
Overrides
ThrowIfNoIconIsProvided()
Declaration
public void ThrowIfNoIconIsProvided()