Skip to content

Usage ‐ QRCodes

Bart Don edited this page Jan 2, 2024 · 1 revision

QRCodes

Flows

To generate a QRcode you can use our operation:

Any of the variables can be used in combination with the {{}} tags that Directus Flows supports by default. Light color is being used for the background color. The dark color is for the for the foreground.

Programmatically

You can also generate QRCodes within Directus Hooks/Endpoints/Operations. This can be done trough globalThis.TTA.

An example usage:

const fileID = await globalThis.TTA.generateQRCode({
    "content": "Your barcode content!",
    "darkColor": "fff",
    "lightColor": "000",
    "margin": 2,
    "width": 200
});
Clone this wiki locally