QRCodeComponent
Represents the Kendo UI QR Code component for Angular.
Shows a QR Code for the provided value.
Definition
Package:@progress/kendo-angular-barcodes
Selector:kendo-qrcode
Export Name:Accessible in templates as #kendoQRCodeInstance="kendoQRCode"
Syntax:
import { Component } from '@angular/core';
@Component({
selector: 'my-app',
template: `
<kendo-qrcode value="https://www.telerik.com/kendo-angular-ui">
</kendo-qrcode>
`
})
export class AppComponent {
}
Inputs
background?
string
Sets the background color of the QR Code. Accepts any valid CSS color string, such as hex or rgb.
"white"
color?
string
Sets the color of the QR Code. Accepts any valid CSS color string, such as hex or rgb.
"black"
Sets the encoding mode for the value.
Important The UTF-8 encoding is not part of the specifications and some readers may not support it.
"ISO_8859_1"
Sets the error correction level.
"L"
Sets an optional image overlay to display over the QR Code.
Note Always test if the code scans correctly with the overlay. If needed, increase the
errorCorrectionlevel to"M"or"H".
padding?
number
Sets the padding for the QR Code in pixels.
0
Sets the rendering mode for the QR Code.
"svg"
resizeRateLimit
number
Limits how often the QR Code resizes automatically. Sets the maximum redraws per second when the container size changes.
Set to 0 to disable automatic resizing.
10
size?
string | number
Sets the size of the QR Code. Numeric values are in pixels.
If no size is specified, the size will be determined from the element width and height. If the element has width or height of zero, a default value of 200 pixels will be used.
"200px"
value
string | number
Sets the value to encode in the QR Code.
Methods
Exports the component as an image. The export operation is asynchronous and returns a promise.
The parameters for the exported image.
Returns:Promise<string>
- A promise that will be resolved with a PNG image encoded as a Data URI.
Exports the component as an SVG document. The export operation is asynchronous and returns a promise.
The parameters for the exported file.
Returns:Promise<string>
- A promise that will be resolved with an SVG document that is encoded as a Data URI.
Exports the component as a Drawing Group.
- The exported Group.
Detects the size of the container and redraws the component.
Resizing is automatic unless you set the resizeRateLimit option to 0.