SkiaSharp.Views.Blazor
4.152.0
Prefix Reserved
See the version list below for details.
dotnet add package SkiaSharp.Views.Blazor --version 4.152.0
NuGet\Install-Package SkiaSharp.Views.Blazor -Version 4.152.0
<PackageReference Include="SkiaSharp.Views.Blazor" Version="4.152.0" />
<PackageVersion Include="SkiaSharp.Views.Blazor" Version="4.152.0" />
<PackageReference Include="SkiaSharp.Views.Blazor" />
paket add SkiaSharp.Views.Blazor --version 4.152.0
#r "nuget: SkiaSharp.Views.Blazor, 4.152.0"
#:package SkiaSharp.Views.Blazor@4.152.0
#addin nuget:?package=SkiaSharp.Views.Blazor&version=4.152.0
#tool nuget:?package=SkiaSharp.Views.Blazor&version=4.152.0
SkiaSharp.Views.Blazor
SkiaSharp.Views.Blazor brings SkiaSharp to Blazor WebAssembly with ready-to-use Razor components. Draw with the same SkiaSharp API used by native .NET applications while the package handles the browser canvas, JavaScript interop, input events, and WebAssembly native assets.
What you get
SKCanvasViewfor CPU-rendered, on-demand drawing to an HTML canvas.SKGLViewfor WebGL-backed rendering and continuous animation.- Pointer, wheel, and touch input events.
- Density-aware sizing and explicit invalidation.
- Transitive WebAssembly native assets and build integration.
Get started
Install the package into a Blazor WebAssembly project:
dotnet add package SkiaSharp.Views.Blazor
Add the namespaces to _Imports.razor:
@using SkiaSharp
@using SkiaSharp.Views.Blazor
Add a canvas to a Razor component:
<SKCanvasView OnPaintSurface="OnPaintSurface"
IgnorePixelScaling="true" />
@code {
private void OnPaintSurface(SKPaintSurfaceEventArgs e)
{
var canvas = e.Surface.Canvas;
canvas.Clear(SKColors.White);
using var paint = new SKPaint
{
Color = SKColors.CornflowerBlue,
IsAntialias = true,
};
canvas.DrawCircle(
e.Info.Width / 2f,
e.Info.Height / 2f,
Math.Min(e.Info.Width, e.Info.Height) * 0.3f,
paint);
}
}
The package supplies its browser interop automatically. Use .NET 8 or later for a complete WebAssembly application with the supported native assets. For animated or GPU-heavy scenes, switch to SKGLView and enable its render loop.
See it running
- Live Blazor WebAssembly Gallery - interactive SkiaSharp examples with no installation
- Buildable Blazor WebAssembly sample
- SkiaFiddle - experiment with drawing code in your browser
Documentation and resources
- SkiaSharp documentation
- Blazor API reference on Microsoft Learn
- Core SkiaSharp API reference
- WebAssembly package guidance
Feedback and contributing
SkiaSharp is an open-source Microsoft project built with the .NET community. Use GitHub Discussions for questions, file bugs and feature requests in the issue tracker, and read the contributing guide to get involved.
This package is released under the MIT license.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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. |
-
net10.0
- Microsoft.AspNetCore.Components.Web (>= 10.0.0)
- SkiaSharp (>= 4.152.0)
- SkiaSharp.NativeAssets.WebAssembly (>= 4.152.0)
-
net6.0
- Microsoft.AspNetCore.Components.Web (>= 6.0.0)
- SkiaSharp (>= 4.152.0)
- SkiaSharp.NativeAssets.WebAssembly (>= 4.152.0)
-
net9.0
- Microsoft.AspNetCore.Components.Web (>= 9.0.0)
- SkiaSharp (>= 4.152.0)
- SkiaSharp.NativeAssets.WebAssembly (>= 4.152.0)
NuGet packages (27)
Showing the top 5 NuGet packages that depend on SkiaSharp.Views.Blazor:
| Package | Downloads |
|---|---|
|
Maanfee.Dashboard.Core
Package Description |
|
|
LiveChartsCore.SkiaSharpView.Blazor
Simple, stunning, interactive and powerful data visualization for .Net. This package includes all the required code and dependencies for rendering charts in Blazor WASM with SkiaSharp. |
|
|
ScottPlot.Blazor
User controls for displaying interactive plots in Blazor applications |
|
|
Mapsui.Blazor
Blazor map components based on the Mapsui library |
|
|
Masa.Blazor.SomethingSkia
Package Description |
GitHub repositories (13)
Showing the top 13 popular GitHub repositories that depend on SkiaSharp.Views.Blazor:
| Repository | Stars |
|---|---|
|
ScottPlot/ScottPlot
Interactive plotting library for .NET
|
|
|
Live-Charts/LiveCharts2
Beautiful, interactive charts, maps, and gauges. One API for every .NET UI framework.
|
|
|
Webreaper/Damselfly
Damselfly is a server-based Photograph Management app. The goal of Damselfly is to index an extremely large collection of images, and allow easy search and retrieval of those images, using metadata such as the IPTC keyword tags, as well as the folder and file names. Damselfly includes support for object/face detection.
|
|
|
Mapsui/Mapsui
Mapsui is a .NET Map component for: MAUI, Avalonia, Uno Platform, Blazor, WPF, WinUI, Windows Forms, Eto Forms, .NET for Android and .NET for iOS
|
|
|
masastack/MASA.Blazor
Blazor UI component library based on Material Design. Support Blazor Server, Blazor WebAssembly and MAUI Blazor.
|
|
|
DevExpress/Blazor
[Archived] This repository has been archived and will no longer receive content updates.
|
|
|
DrawnUi/DrawnUi.Net
Rendering engine for .NET MAUI, Blazor, OpenTK and pure .NET powered by SkiaSharp 🎨
|
|
|
dashiell-zhang/NetEngine
基于 .Net 框架搭建的一个基础项目结构
|
|
|
KristofferStrube/Blazor.SVGEditor
A basic SVG editor written in Blazor.
|
|
|
mono/SkiaSharp.Extended
SkiaSharp is a cross-platform, comprehensive 2D graphics API for all .NET platforms. And, here is where you will find all sorts of extras that you can use with it.
|
|
|
davidwengier/Trains.NET
A simple 2D game written in C# with .NET Core. Development is streamed live on https://twitch.tv/davidwengier and past streams available on YouTube at http://bit.ly/trains-net-videos
|
|
|
guitarrapc/FeatherQR
High-performance QR code generator/reader with SkiaSharp integration.
|
|
|
EngstromJimmy/ZXSpectrum
Due to popular demand I have added my ZX Spectrum emulator
|
| Version | Downloads | Last Updated |
|---|---|---|
| 4.154.0-preview.1.26454.9 | 55 | 9/5/2026 |
| 4.153.0-preview.1.26454.6 | 69 | 9/5/2026 |
| 4.152.0 | 188 | 9/9/2026 |
| 4.152.0-rc.1.26426.14 | 135 | 8/27/2026 |
| 4.152.0-preview.1.1 | 189 | 8/8/2026 |
| 4.151.2 | 780 | 9/3/2026 |
| 4.151.1 | 6,574 | 8/5/2026 |
| 4.151.0 | 1,349 | 7/31/2026 |
| 4.151.0-rc.1.1 | 117 | 7/22/2026 |
| 4.151.0-preview.2.1 | 106 | 7/14/2026 |
| 4.151.0-preview.1.1 | 290 | 7/2/2026 |
| 4.150.3 | 106 | 9/2/2026 |
| 4.150.2 | 1,904 | 8/5/2026 |
| 4.150.1 | 6,707 | 7/14/2026 |
| 4.150.0 | 912 | 7/8/2026 |
| 4.150.0-rc.1.1 | 150 | 6/30/2026 |
| 4.150.0-preview.2.1 | 109 | 6/25/2026 |
| 4.150.0-preview.1.1 | 241 | 6/15/2026 |
| 4.148.0 | 9,579 | 6/23/2026 |
| 4.148.0-rc.1.2 | 146 | 6/14/2026 |
Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release notes.