QR Code Generator is a lightweight, fully client-side Reactive Web Block for OutSystems that allows you to generate QR codes directly in your application without any server-side processing or external API calls.
Built on top of the popular open-source qrcode.js library, this component is easy to drop into any Reactive Web screen and configure with just a few properties.
Note: The component loads qrcode.js dynamically from CDN. An internet connection is required on first load. For offline environments, host the library internally and update the script URL accordingly.
Ctrl+Q
QRCodeLib
QRCodeGenerator
QRCodeConfig
DownloadQRCode
Config
Ctrl+P
ShowDownloadButton
Text
""
Width
200
Height
ColorDark
"#000000"
ColorLight
"#ffffff"
ErrorLevel
"M"
L
M
Q
H
WidgetId
QRBinary
GenerateQRCode
This action is used internally by the Web Block. You do not need to call it directly unless building a custom implementation.
ConvertBase64ToBinary
Used internally to convert the JS canvas Base64 output to OutSystems Binary Data type.
Base64String
BinaryData
Simply drag the block onto your screen and configure:
QRCodeGenerator Config: Text = "https://www.outsystems.com" Width = 200 Height = 200 ColorDark = "#000000" ColorLight = "#ffffff" ErrorLevel = "M" ShowDownloadButton = False
Result: A 200x200 QR code that encodes the OutSystems website URL.
Bind the QR code to a local variable so it updates as the user types:
URLToEncode
"https://outsystems.com"
QRCodeGenerator Config: Text = URLToEncode Width = 250 Height = 250 ColorDark = "#000000" ColorLight = "#ffffff" ErrorLevel = "M" ShowDownloadButton = True
Result: QR code updates automatically when the user changes the input.
Generate a branded QR code with custom colors:
QRCodeGenerator Config: Text = "https://www.yourcompany.com" Width = 200 Height = 200 ColorDark = "#E8173A" ← Red dots ColorLight = "#FFF5F6" ← Light pink background ErrorLevel = "M" ShowDownloadButton = True
⚠️ Important: Always ensure enough contrast between ColorDark and ColorLight — low contrast QR codes may fail to scan.
Use this when you need to process the QR image before downloading (e.g., adding watermark via server):
On Click (Download Button) │ ├── DownloadQRCode │ Input: WidgetId = QRContainer.Id │ Output: QRBinary │ ├── YourServerAction (process QRBinary as needed) │ Input: InputBinary = QRBinary │ Output: ModifiedBinary │ └── JavaScript Node (trigger download) Input: ModifiedBase64 = BinaryToBase64(ModifiedBinary)
JavaScript to trigger download after processing:
var link = document.createElement("a"); link.download = "qrcode.png"; link.href = "data:image/png;base64," + $parameters.ModifiedBase64; link.click();
The component handles multiple instances automatically. Just drag multiple blocks:
Screen ├── QRCodeGenerator (Config.Text = "https://site1.com") ├── QRCodeGenerator (Config.Text = "https://site2.com") └── QRCodeGenerator (Config.Text = "https://site3.com")
Each block renders its own unique QR code independently. No extra configuration needed.
Generate a QR code that opens contact info when scanned:
QRCodeGenerator Config: Text = "BEGIN:VCARD" + "VERSION:3.0" + "FN:John Doe" + "ORG:OutSystems" + "TEL:+1234567890" + "EMAIL:john@example.com" + "END:VCARD" Width = 250 Height = 250 ErrorLevel = "M"
Result: Scanning this QR code opens the contact in the phone's contacts app.
Possible Causes & Fixes:
Config.Text
Ctrl+Shift+R
QRCode is not defined
This means the qrcode.js library failed to load.
Fix:
qrcode.min.js
https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js
src
ShowDownloadButton = True
This should not happen with the current implementation.If it does:
Fix:Make sure the Config.Text is bound to a Local Variable (not a hardcoded value):
Assign: URLToEncode = URLToEncode
150
ColorLight = "#ffffff"
Documentation Version: 1.0.0Component Version: 1.0.0Last Updated: 2026Author: — (your name here)