New to Kendo UI for Vue? Start a free 30-day trial

QRCode

Component

Represents the Kendo UI for Vue QRCode component. Accepts properties of type QRCodeProps.

Definition

Package:@progress/kendo-vue-barcodes

Properties Interface:QRCodeProps

Syntax:

vue
<QRCode
    :value="'https://www.telerik.com/kendo-vue-ui'"
    :size="200"
    :error-correction="'M'"
    :encoding="'UTF_8'"
    :render-as="'svg'"
/>

Properties

Sets the background color of the QRCode. Accepts any valid CSS color string, such as hex and rgb values.

Default:

'#fff'

Sets the border of the QRCode. Accepts an object of type Border.

color?

string

Sets the color of the QRCode. Accepts any valid CSS color string, such as hex and rgb values.

Default:

'#000'

Sets the encoding mode of the value (see example).

The possible values are:

  • "ISO_8859_1"—Supports all characters from the ISO/IEC 8859-1 character set.
  • "UTF_8"—Supports all Unicode characters.
Default:

"ISO_8859_1"

Sets the error correction level.

The possible values are:

  • "L"—Restores about 7% of the codewords.
  • "M"—Restores about 15% of the codewords.
  • "Q"—Restores about 25% of the codewords.
  • "H"—Restores about 30% of the codewords.
Default:

'L'

Exports the QRCode as an image. Accepts optional export settings and returns a Promise that resolves with the image data string.

Parameters:options?ImageExportOptionsReturns:

Promise​<string>

Exports the QRCode as an SVG document. Accepts optional export settings and returns a Promise that resolves with the SVG data string.

Parameters:options?SVGExportOptionsReturns:

Promise​<string>

Sets an optional image overlay that appears over the QRCode (see example).

Always test that the code reads correctly with the overlay. Depending on the length of the value and the size of the overlay, you might need to raise the errorCorrection level to "M" or "H".

padding?

number

Sets the padding of the QRCode. A number sets all paddings.

Default:

0

Sets the rendering engine of the component.

The possible values are:

  • "svg"—Renders the component as an inline svg element, if the browser supports it.
  • "canvas"—Renders the component as a canvas element, if the browser supports it.
Default:

'svg'

size?

string | number

Sets the size of the QRCode. Numbers represent pixels.

When you do not set it, the QRCode takes its size from the width and height of the element. When the element has a width or height of zero, the QRCode uses 200 pixels.

value?

string | number

Sets the value of the QRCode. Accepts a string or a number.