Installation
Install the Web Components package with your preferred package manager. Custom elements require a browser with Custom Elements, Shadow DOM, andElementInternals support.
definePictumElements() once in a browser entry point. It is safe to call again against the same registry, but registration is not available during server rendering.
Agent skill
Install the Web Components integration skill for coding agents that support Agent Skills:Configuration
Elements use the production Pictum API by default. Setbase-url on an element when you use another deployment:
{ baseUrl } option.
Icons
Use<pictum-icon> in markup. Use icon() when script code needs the image URL or canonical SVG.
Avatars
Use<pictum-avatar> for generated avatars or portraits. Use avatar() when script code needs an image URL; generated avatars also provide canonical SVG markup.
QR codes
Use<pictum-qr-code> for scannable text or URLs. Use qrCode() when script code needs the image URL or canonical SVG.
Placeholders
Use<pictum-placeholder> for square or custom-dimension images. Use placeholder() when script code needs the selected image URL or SVG markup.
alt to label its host for assistive technology. Avatar, QR code, and placeholder elements forward loading, decoding, fetchpriority, crossorigin, referrerpolicy, width, and height to their internal image; the icon element renders inline SVG instead. Each element exposes read-only status and error properties for loading state.
Helpers return an asset immediately. Reading .url makes no request; .svg() fetches canonical SVG markup and is unavailable for portrait avatars.