IQrCodeLogo

interface
Data Display

Optional logo overlay rendered at the centre of an OrigamQrCode. The overlay is painted on top of the matrix — error-correction compensates for covered modules up to the configured level.

TypeScript

Définition

La définition TypeScript de l'interface telle que trouvée dans le code source d'origam. Cliquez sur l'icône de copie pour copier l'extrait.

typescript

API

Propriétés

Chaque propriété déclarée par cette interface, avec son type, son caractère optionnel et sa valeur par défaut.

src
requis
string
Logo source URL. Any URL accepted by <image href> — SVG, PNG, data-URI. If the asset fails to load the QR matrix remains valid.
size
number
Logo width as a proportion of the QR width (0..1). Default 0.2. Values above 0.3 trigger a console.warn as no error-correction level survives that.
padding
number
Pixel padding of the opaque backdrop drawn around the logo. Default 6. Keeps adjacent modules readable.
background
string
Backdrop colour under the logo and within the padding box. Defaults to the QR background. Pass a brand colour to create a coloured halo.

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

Extraits de code prêts à coller utilisant cette interface.

QR code with a centred logo overlay

typescript