Skip to main content
SSR CSR

Installation

Install the Svelte 5+ package with your preferred package manager. Use a Svelte-aware bundler so it resolves the package’s svelte export.

Agent skill

Install the Svelte integration skill for coding agents that support Agent Skills:

Icons

Render an icon with Icon, or use icon() when you need its URL or SVG markup in a script.

Avatars

Render a generated avatar or portrait with Avatar, or use avatar() to pass the selected image URL to another service. Generated avatars also provide canonical SVG markup.

QR codes

Render scannable text or URLs with QrCode, or use qrCode() when script code needs the image URL or canonical SVG.

Placeholders

Render square or custom-dimension images with Placeholder, or use placeholder() when script code needs the selected image URL or SVG markup.

Use reactive helpers

Use useIcon, useAvatar, useQrCode, and usePlaceholder with values or getter functions. Read the current asset through .current.
The package also re-exports the raw icon(), avatar(), qrCode(), and placeholder() helpers. Raw helpers return an asset immediately. Reading .url makes no request; .svg() fetches canonical SVG markup and is unavailable for portrait avatars.

Custom deployment

You do not need a provider to use Pictum’s production API. Components and reactive helpers work immediately after installation. Only add PictumProvider when a subtree should use another Pictum deployment:
Pass options={{ baseUrl }} to one component or pass options to a use* reactive helper to override the provider. Raw helpers do not read provider context; pass baseUrl directly to those calls.