API Reference
This page lists the public exports from @zynthjs/skia as they are exposed from src/index.ts. The package surface is split across view components, declarative drawing nodes, imperative surface helpers, resource loaders, shader utilities, reactive primitives, capability checks, and public types.
Use the focused pages for narrative guidance. Use this page as the package index when you need to locate a specific export quickly.
Basic usage
import {
Canvas,
Rect,
createImage,
createPath,
createRuntimeEffect,
} from "@zynthjs/skia";
Advanced examples
Mixed declarative and resource exports
import { Canvas, Image, ImageSVG, createImage, createSVG } from "@zynthjs/skia";
const image = createImage({ uri: "https://example.com/hero.png" });
const icon = createSVG({ uri: "https://example.com/icon.svg" });
Namespace-style helpers
import { Skia } from "@zynthjs/skia";
const effect = Skia.RuntimeEffect.Make(`
uniform float t;
half4 main(vec2 fragCoord) {
return half4(t, 0.4, 0.8, 1.0);
}
`);
Special cases and unusual features
useImage,useSVG,useSkottie,useClock,usePathInterpolation, andusePathValueremain exported as compatibility aliases. The primary naming style iscreateXxx.interpolateSharedandtoSharedScalarare re-exported from@zynthjs/core.- Some lower-level font manager factories exist through the
Skianamespace but are not exported as top-level functions. - The public type surface includes both declarative props and imperative command unions so that callers can author draw systems without importing private files.
API Reference
Components
SkiaViewSkottieViewCanvasGroupPaintRectCirclePathTextImageImageSVGSkottieShaderLinearGradientMask
Surface and drawing helpers
createSkiaSurfacecreatePath
Shaders and values
createShadercreateRuntimeEffectcreateSkiaValueSkiainterpolateSharedtoSharedScalar
Reactive primitives
createClockcreatePathInterpolationcreatePathValueuseClockusePathInterpolationusePathValue
Fonts
createFontcreateFontFromStylecreateFontLoaderlistFontFamiliesmatchFontuseFontvec
Images
createImagemakeImagemakeImageFromEncodedmakeSkiaDataFromBase64makeSkiaDataFromBytesuseImageAlphaTypeColorTypeCubicSamplingFilterModeMipmapMode
SVG
createSVGmakeSVGFromDatamakeSVGFromStringuseSVG
Skottie
createSkottiemakeSkottiemakeSkottieFromDatamakeSkottieFromStringuseSkottie
Capability helpers
getSkiaCapabilitiessupportsSkiaFeatureassertSkiaFeature
Main component and controller types
SkiaViewPropsSkiaSurfaceSkiaSurfaceControllerLayoutRectangleLayoutChangeEvent
Declarative prop types
SkiaCanvasPropsSkiaGroupPropsSkiaPaintPropsSkiaRectPropsSkiaCirclePropsSkiaPathPropsSkiaTextPropsSkiaImagePropsSkiaSVGPropsSkiaSkottiePropsSkiaShaderPropsSkiaLinearGradientPropsSkiaMaskProps
Draw command types
SkiaDrawCommandSkiaDrawClearSkiaDrawRectSkiaDrawCircleSkiaDrawLineSkiaDrawPathSkiaDrawTextSkiaDrawImageSkiaDrawSVGSkiaDrawSkottieSkiaDrawRuntimeShaderRectSkiaDrawRuntimeShaderCircleSkiaDrawRuntimeShaderPathSkiaDrawSaveLayerSkiaDrawSaveLayerLuminanceMaskSkiaDrawRestoreSkiaFrameSpec
Path, shader, and value types
SkiaPathCommandSkiaPathObjectSkiaPathSourceSkiaShaderInputSkiaShaderProgramSkiaShaderSourceSkiaRuntimeEffectSkiaRuntimeShaderUniformSkiaRuntimeShaderUniformMapSkiaRuntimeUniformsSkiaUniformMapSkiaUniformPrimitiveSkiaUniformValueSkiaScalarValueCreateSkiaValueOptionsSkiaValueTupleSkiaClockOptionsSkiaProgressValueSkiaUsePathValueUpdaterSkiaInterpolationTokenSharedSignalAccessorSharedScalarRefInterpolatedScalarRef
Geometry, paint, and capability types
SkiaPointSkiaPointLikeSkiaTileModeSkiaLinearGradientSkiaStrokeCapSkiaStrokeJoinSkiaFeatureSkiaCapabilities
Font and text types
SkiaFontSkiaFontManagerSkiaFontStyleSkiaFontStyleSlantSkiaFontWeightSkiaTypefaceSkiaTypefaceFontProvider
Image, SVG, and animation types
SkiaDataSkiaImageSkiaImageSourceSkiaImageInfoSkiaImageFitSkiaImageCubicSamplingSkiaImageFilterModeSkiaImageMipmapModeSkiaImageSamplingSkiaSVGSkiaSVGSourceSkiaSkottieSkiaSkottieSource