New to Kendo UI for AngularStart a free 30-day trial

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:

ts
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

Sets the background color of the QR Code. Accepts any valid CSS color string, such as hex or rgb.

Default:

"white"

Sets the border of the QR Code.

color?

string

Sets the color of the QR Code. Accepts any valid CSS color string, such as hex or rgb.

Default:

"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.

Default:

"ISO_8859_1"

Sets the error correction level.

Default:

"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 errorCorrection level to "M" or "H".

padding?

number

Sets the padding for the QR Code in pixels.

Default:

0

Sets the rendering mode for the QR Code.

Default:

"svg"

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.

Default:

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.

Default:

"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.

Parameters:optionsImageExportOptions

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.

Parameters:optionsSVGExportOptions

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.

Returns:

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.