QR Code Reader

Read a QR Code with the camera of the device.

<QRCodeReader on:nnsQRCode={({ detail }) => console.log(detail)} />

Notes

If used in a modal, prefer the wrapper <QRCodeReaderModal />.

Library

This component uses the library jsQR.

Events

Event Description
nnsQRCode The QR code value. Cannot be undefined nor empty.
nnsQRCodeError An error thrown if the component cannot instantiate the camera of the device.

Showcase

Result: