
Product
Introducing Socket Fix for Safe, Automated Dependency Upgrades
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
qr-border-plugin
Advanced tools
The qr-border-plugin
is an extension for the QR Code Styling library that adds customizable borders and decorations (such as text or images) to your QR codes.
You can install it and use in development without license. But you need to buy license key to use it in production, otherwise you will see watermark.
You can use the qr-border-plugin
directly via CDN:
<script
type="text/javascript"
src="https://unpkg.com/qr-border-plugin"
></script>
Or, via npm registry
npm install qr-border-plugin
Here's an example of how to integrate the qr-border-plugin
into your qr-code-styling
:
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>QR Code Styling</title>
<script
type="text/javascript"
src="https://unpkg.com/qr-border-plugin@0.0.8"
></script>
<script
type="text/javascript"
src="https://unpkg.com/qr-code-styling@1.6.0-rc.1"
></script>
</head>
<body>
<div id="canvas"></div>
<script type="text/javascript">
const options = {
shape: "circle",
type: "svg",
width: 500,
height: 500,
margin: 70,
data: "test",
image:
"https://qr-code-styling.com/b9eac011a0558695563d6081a8395ccb.png",
dotsOptions: {
type: "dots",
color: "#000000",
},
backgroundOptions: {
round: 1,
color: "#D5B882",
},
cornersSquareOptions: {
type: "rounded",
},
cornersDotOptions: {
type: "rounded",
},
imageOptions: {
crossOrigin: "anonymous",
margin: 20,
},
};
const extensionOptions = {
round: 1,
thickness: 60,
color: "#000000",
decorations: {
top: {
type: "text",
value: "SEE WHY IT'S SUPER",
style: "font: 30px sans-serif; fill: #D5B882;",
},
bottom: {
type: "text",
value: "SCAN ME",
style: "font: 30px sans-serif; fill: #D5B882;",
},
},
borderInner: {
color: "#000000",
thickness: 10,
},
borderOuter: {
color: "#000000",
thickness: 10,
},
};
const qrCode = new QRCodeStyling(options);
// Apply the border extension
qrCode.applyExtension(QRBorderPlugin(extensionOptions));
// Set the license key (replace 'key' with your actual key)
QRBorderPlugin.setKey("key");
qrCode.append(document.getElementById("canvas"));
</script>
</body>
</html>
The extensionOptions
object allows you to customize the border and decorations of the QR code. Here's a breakdown of the properties:
round
number
round: 1
thickness
number
thickness: 60
color
string
color: "#000000"
dasharray
string
dasharray: "4 1"
decorations
object
top
, bottom
, left
, right
object
type
string
text
or image
.value
string
style
string
decorations: {
top: {
type: "text",
value: "SEE WHY IT'S SUPER",
style: "font: 30px sans-serif; fill: #D5B882;",
}
}
borderInner
object
thickness
, color
, dasharray
borderOuter
object
thickness
, color
, dasharray
The qr-border-plugin
includes license verification using the Lefe License. To use the plugin without watermarking, you need to set a valid license key using:
QRBorderPlugin.setKey("your_license_key");
If no valid license is provided, a watermark will be added to the generated QR code. This watermark is removed when a valid key is used.
Feel free to open an issue if you have any improvements or suggestions for qr-border-plugin
.
This project is under Commercial License. You need to buy license key to use it in production.
FAQs
Plugin for generating different borders of qr-code-styling
The npm package qr-border-plugin receives a total of 568 weekly downloads. As such, qr-border-plugin popularity was classified as not popular.
We found that qr-border-plugin demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
Security News
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
Product
We’re excited to announce a powerful new capability in Socket: historical data and enhanced analytics.