📸 QR code reader

You now have access to a brand new QR code reader element in the WeWeb toolkit:

QR code reader element

This element comes with 2 in-built variables:

  • QR Code Reader - cameras 
  • QR Code Reader – code 

 

The "QR Code Reader - cameras" variable lists all the cameras found on the device that is accessing the app.

By default, the element will activate the user's default camera. But you allow users to choose the camera they want to use to scan a QR code.

In the example below, we bound the list of cameras found by the QR code reader to a select element:

Select camera for QR code reader

When a user scans a QR code, the "QR Code Reader - code" variable will be updated with the value referenced by the QR code, for example a URL.

In the example below, you can see we scanned a QR code that referenced WeWeb's Twitter account:

QR code reader - code variable

Depending on your use case, you may want to trigger a workflow when a user scans a QR code, to display a modal for example. 

For these use cases, you'll find a pre-built workflow on QR code reader element that triggers "On scan".

Learn how to use the QR code reader.

Start building for free

Sign up now, pay when you're ready to publish.