Skip to main content
pictum provides framework-independent helpers for JavaScript and TypeScript applications. Generate asset URLs synchronously or retrieve canonical SVG markup on demand without a component runtime. The package is an ES module. Use a browser or server runtime that provides URL, URLSearchParams, TextEncoder, btoa, and fetch when the selected helpers require them.

Installation

Install the package with your preferred package manager.

Agent skill

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

Icons

Identify an icon by collection and name. Reading .url makes no network request; call .svg() when you need canonical SVG markup.

Avatars

Choose a stable seed, avatar variant, and image format. Portrait avatars accept any, male, or female for gender. The default is any.
The selected format controls .url. The optional size requests a square raster source from 16 to 1024 pixels. Generated avatars support .svg(); portrait avatars are raster-only and default to WebP.

QR codes

Pass the text or URL to encode, select an output format, choose whether to include the quiet zone, and optionally set RGB or RGBA colors.

Placeholders

Create square or custom-dimension placeholders with optional text, colors, and retina density.

Custom deployment

Pass an absolute baseUrl to any helper when you use a custom or staging deployment.
baseUrl must be an absolute HTTP or HTTPS URL without credentials, a query, or a fragment.