New to Telerik UI for Blazor? Start a free 30-day trial

Use Legacy v4 SVG Icons with New Telerik UI for Blazor Versions

Updated on Nov 12, 2026

Environment

ProductUI for Blazor
Version16.0 and above

Description

Telerik UI for Blazor 15.2.0 and older versions depend on Telerik.SvgIcons 4.x. Telerik UI for Blazor 16.0.0 and newer versions depend on Telerik.SvgIcons 5.x.

The icons in versions 4 and 5 use different styling. This article explains how to keep using old legacy v4 Telerik SVG icons after upgrading to Telerik UI for Blazor 16.0.0 or a newer version.

The suggested algorithms in this article are not applicable to apps that use Telerik font icons. If you want to use v4 font icons with the latest Telerik UI for Blazor version, then load an old font icon stylesheet instead:

HTML
<link rel="stylesheet" href="https://unpkg.com/@progress/kendo-font-icons@4.12.0/dist/index.css" />

Solution

The app must use a modified version of the Telerik.SvgIcons v4 NuGet package. You can choose one of the following options:

Use Prebuilt SVG Icon NuGet Package

  1. Download the TelerikSvgIcons4.4.12.0.nupkg NuGet package. It packs a modified version of the Telerik.SvgIcons project that is used to publish the Telerik.SvgIcons NuGet package.
  2. Add the TelerikSvgIcons4 package to a local NuGet feed or another custom feed in your development and deployment environments.
  3. Install the TelerikSvgIcons4 package in your Blazor app.
    XML
    <ItemGroup>
        <PackageReference Include="Telerik.UI.for.Blazor" Version="16.*" />
        <PackageReference Include="TelerikSvgIcons4" Version="4.12.0" />
    </ItemGroup>
  4. Add an icon replacement service to your Blazor app:
    C#
    using System;
    using System.Collections.Concurrent;
    using System.Reflection;
    using Telerik.Blazor.Services;
    using Telerik.SvgIcons;
    using TelerikSvgIcons4;
    
    namespace MyBlazorAppRootNamespace.Services;
    
    public class TelerikSvgIconsV4Service : ITelerikIconService
    {
        private static readonly ConcurrentDictionary<string, PropertyInfo?> Cache = new();
    
        public object? ReplaceIcon(IconInfo iconInfo)
        {
            var prop = Cache.GetOrAdd(iconInfo.IconName,
                name => typeof(SvgIcon4).GetProperty(name, BindingFlags.Public | BindingFlags.Static));
            return prop?.GetValue(null) as ISvgIcon;
        }
    }
  5. Register the TelerikSvgIconsV4Service icon replacement service in Program.cs after the Telerik services:
    C#
    builder.Services.AddTelerikBlazor();
    builder.Services.AddSingleton<ITelerikIconService, TelerikSvgIconsV4Service>();
  6. Add the TelerikSvgIcons4 namespace to _Imports.razor:
    RAZOR
    @using Telerik.Blazor
    @using Telerik.Blazor.Components
    @using Telerik.SvgIcons
    
    @using TelerikSvgIcons4
  7. At this point, all Telerik Blazor components that render SVG icons internally without public API control will switch to v4 icons.
  8. If you need to display a v5 SVG icon, use a <TelerikSvgIcon> component:
    RAZOR
    <TelerikSvgIcon Icon="@SvgIcon.Bold" />

The Sample App with v4 Telerik SVG Icons demonstrates all the above steps. The application includes both the TelerikSvgIcons4.4.12.0.nupkg NuGet package and its source code.

Create Custom SVG Icon NuGet Package

The following algorithm describes how to create your own version of the TelerikSvgIcons4.4.12.0.nupkg NuGet package with a name and icon set that suits your preferences. The main goal is to use the legacy icon package alongside the original Telerik.SvgIcons package without namespace and class name conflicts.

  1. Clone the kendo-icons GitHub repository.
  2. Checkout the release-v4.x branch.
  3. All the following steps concern only the Telerik.SvgIcons project inside the kendo-icons/packages/svg-icons/src-cs/Telerik.SvgIcons folder of the repository.
  4. Delete the following files and folders:
    • Models folder—it contains the definitions for SvgIconBase and ISvgIcon, which will be reused from the original referenced Telerik.SvgIcons package.
    • NOTICE.txt file
    • README.md file
    • Telerik.snk file
  5. Rename the Telerik.SvgIcons project folder and project file. This will also rename the project itself and the root namespace. This guide assumes the new project name is TelerikSvgIcons4.
  6. Replace the TelerikSvgIcons4.csproj content. Use the latest Telerik.SvgIcons 4.x version or set one according to your preferences.
    XML
    <Project Sdk="Microsoft.NET.Sdk">
    <PropertyGroup>
        <TargetFramework>netstandard2.0</TargetFramework>
        <PackageId>TelerikSvgIcons4</PackageId>
        <Version>4.12.0</Version>
        <NoWarn>$(NoWarn);CS0618</NoWarn>
    </PropertyGroup>
    <ItemGroup>
        <PackageReference Include="Telerik.SvgIcons" Version="4.12.0" />
    </ItemGroup>
    </Project>
  7. Modify SvgIcon.cs:
    • Rename the file according to your preferences, for example, SvgIcon4.cs.
    • Rename the SvgIcon class in the file accordingly to SvgIcon4.
    • Change the Telerik.SvgIcons namespace to the root project namespace TelerikSvgIcons4
    • Add using Telerik.SvgIcons; in order to recognize the ISvgIcon interface from the original Telerik.SvgIcons package.
  8. Modify all .cs files in the Icons folder:
    • Replace namespace Telerik.SvgIcons with namespace TelerikSvgIcons4
    • Add using Telerik.SvgIcons; in order to recognize the SvgIconBase class from the original Telerik.SvgIcons package.
  9. Build and pack the NuGet package:
    sh
    dotnet pack -c Release
  10. Get the NuGet package and follow the steps from section Use Prebuilt SVG Icon NuGet Package. Make sure that the <Version> in the TelerikSvgIcons4.csproj project file matches the version of the NuGet package reference in the consuming project.

The Sample App with v4 Telerik SVG Icons includes a TelerikSvgIcons4 project that already applies all the above steps.

See Also