Package Information
- Last Updated
- Authors
- Niklas Ausborn
- Dependencies
- @preview/jogs:0.2.4
1. Get the package
Download the package using the TPIX CLI:
tpix get @preview/cades:0.3.12. Import in your Typst file
Add this to your .typ file:
#import "@preview/cades:0.3.1": *Cades
Draw QR codes in typst.
#import "@preview/cades:0.3.1": qr-code
= QR Code for `typst.app`:
#qr-code("https://typst.app", width: 3cm)
Documentation
qr-code
Draw a qr code to an image.
Arguments
content:str- the content of the qr codewidth:length|auto- the width of the qr code, default isautoheight:length|auto- the height of the qr code, default isautocolor:color- the color of the qrcode, default isblackbackground:color- the background color behind the qrcode, default iswhiteerror-correction:"L"|"M"|"Q"|"H"- the error correction level for the qr code, default is"M"
Returns
The image, of type content.
Acknowledgements
This package uses Jogs by Wenzhuo Liu and the qr code rendering code is based on qrcode-svg by papnkukn.