Knowit.Umbraco.SvgPicker 1.0.1

dotnet add package Knowit.Umbraco.SvgPicker --version 1.0.1
                    
NuGet\Install-Package Knowit.Umbraco.SvgPicker -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Knowit.Umbraco.SvgPicker" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Knowit.Umbraco.SvgPicker" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Knowit.Umbraco.SvgPicker" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Knowit.Umbraco.SvgPicker --version 1.0.1
                    
#r "nuget: Knowit.Umbraco.SvgPicker, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Knowit.Umbraco.SvgPicker@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Knowit.Umbraco.SvgPicker&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Knowit.Umbraco.SvgPicker&version=1.0.1
                    
Install as a Cake Tool

Knowit.Umbraco.SvgPicker

A property editor for Umbraco 17 that lets editors pick SVG symbols from a spritesheet. The selected symbol renders as <svg><use>, performant, browser-cached, and design-system safe.

Editors only pick from symbols a designer has built into the sprite. No arbitrary SVG uploads, no inline styles, no broken proportions.

Requirements

  • Umbraco 17 or later
  • .NET 10
  • An SVG spritesheet with <symbol> elements (typically generated by your frontend build, e.g. Vite with @spiriit/vite-plugin-svg-spritemap)

Installation

dotnet add package Knowit.Umbraco.SvgPicker

No changes to Program.cs needed. The package registers itself on startup.

Setup

1. Create a data type

Settings → Data Types → Create → select SVG Picker as the property editor.

Setting Description
SVG Sprite Path Absolute URL to your spritesheet, e.g. /assets/svg/sprite.svg
Picker Title Optional label shown above the icon grid

2. Add to a document type

Add the data type as a property on any document type.

3. Render in Razor

Add the using directive to Views/_ViewImports.cshtml:

@using Knowit.Umbraco.SvgPicker.Extensions

Then render:

@* Default sprite path (/assets/svg/sprite.svg) *@
@Html.SvgIcon(Model.Value<string>("icon"))

@* With a CSS class *@
@Html.SvgIcon(Model.Value<string>("icon"), "w-6 h-6")

@* With an explicit sprite path *@
@Html.SvgIcon(Model.Value<string>("icon"), "w-6 h-6", "/assets/svg/icons.svg")

This renders:

<svg class="w-6 h-6" aria-hidden="true">
  <use href="/assets/svg/sprite.svg#icon-home"></use>
</svg>

How it works

Only the symbol ID (e.g. icon-home) is stored as a plain string. The spritesheet is fetched once by the browser and cached; all <use> references are near-zero cost after that.

The backoffice picker fetches your spritesheet, parses all <symbol> elements, and shows them in a searchable visual grid so editors always know what they're selecting.

Credits

This package continues a lineage of SVG symbol pickers for Umbraco:

This package reimplements the same concept for Umbraco 17 using the Lit/Web Component backoffice.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 151 6/4/2026
1.0.0 101 6/4/2026