Fine-tune light, shadows, borders, neumorphic
Light and shadows
Borders
Neumorphic
Display

QrCode <pm-qr-code>

QR code for a link or short text, drawn as SVG without any dependency.

Full screen
prismora.design

Props

<script type="module"> import '@prismora/css'; import '@prismora/elements/qr-code'; </script> <pm-qr-code value="https://prismora.design" label="Open prismora.design">prismora.design</pm-qr-code>

Overview

It is always dark on light with a quiet zone, whatever the theme, because scanners need that contrast. Holds up to 213 bytes at the default error-correction level; show the same link as text nearby for people who cannot scan.

Attributes

AttributeTypeDefaultDescription
valuestring—The link or text to encode.
labelstring—Accessible name: say where the code leads ("Open the booking page").
sizenumber160Width and height in pixels (default 160).
error-correction
prop: errorCorrection
'L' | 'M' | 'Q' | 'H'MHow much damage the code survives: L (7%), M (15%, default), Q (25%) or H (30%). Higher levels hold less text.
marginnumber4Quiet zone around the code, in modules (default 4, the standard's minimum).

Also accepts the contextual attributes tone, surface, radius, density, motion, elevation. They are inherited from ancestors' data-* attributes.

Slots

SlotDescription
(default)Caption under the code.

Methods

toSvg()