SkiaSharpWebv0.5.1

Installation.

From package to working component.

Install the package

Use the same published version as this showcase, or review the upstream release notes before updating.

npm install @wieslawsoltes/skiasharpweb@0.5.1

This package’s license: MIT + native notices. Retain upstream and bundled third-party notices when redistributing.

Mount your first view

Import /browser and copy native assets with skiasharp-web-assets. Supply the correct assetBaseUrl, including your deployment base path.

HTML
<div class="toolbar"><label>Petals <input id="petals" type="range" min="3" max="19" value="7"></label><label>Layers <input id="layers" type="range" min="4" max="32" value="18"></label><button id="redraw">Redraw</button><output>Native Skia · raster</output></div><skia-canvas id="canvas" backend="canvas" class="stage"></skia-canvas><p class="hint">Real SKPath geometry rendered by native Skia WASM. No implicit font downloads.</p>
Native assets
npx --no-install skiasharp-web-assets public/skia

The complete executable source is in the usage guide. Imports shown here are intended for a bundler or a browser import map; bare npm imports do not resolve in ordinary HTML by themselves.

Own the lifetime

Dispose owned paints, paths, images and surfaces. Treat WebGPU availability separately from successful raster rendering.

The playground replaces its entire isolated frame on each run. In your application, use the framework’s unmount or disposal hook instead. Do not dispose a shared model while another view still owns it.

Read the lifecycle guide →

Know the contract

Native runtime startup is asynchronous. The showcase uses a raster backend for predictable sandbox compatibility, not as evidence of physical-GPU qualification.

Source repositories can contain work newer than the published package. The showcase uses @wieslawsoltes/skiasharpweb@0.5.1.

Upstream compatibility documentation ↗
↑ ↓ to explore · Enter to openEsc to close