View Source QRCodeEx.SVG (QRCodeEx v0.1.1)
Render the QR Code matrix in SVG format
qr_code_content
|> QRCodeEx.encode()
|> QRCodeEx.svg(color: "#cc6600", shape: "circle", width: 300)
You can specify the following attributes of the QR code:
background_color
: In hexadecimal format or:transparent
. The default is#FFF
color
: In hexadecimal format. The default is#000
shape
: Onlysquare
orcircle
. The default issquare
width
: The width of the QR code in pixel. Without the width attribute, the QR code size will be dynamically generated based on the input string.viewbox
: When set totrue
, the SVG element will specify its height and width usingviewBox
, instead of explicitheight
andwidth
tags.
Default options are [color: "#000", shape: "square"]
.
Link to this section Summary
Functions
Return the SVG format of the QR Code
Link to this section Functions
Specs
Return the SVG format of the QR Code