QR Code Styling
JavaScript library for generating QR codes with customizable styling in browser or Node.js
Quickstart
Start generating customised QR codes instantly
import { QRCodeStyling } from '@liquid-js/qr-code-styling'
const qrCode = new QRCodeStyling({
data: 'https://qrky.to', // QR code data
dotsOptions: {
color: '#4267b2', // Primary colour
type: 'rounded', // Dot shape (rounded corners)
size: 10 // Dot size (in pixels)
},
backgroundOptions: {
color: '#d0f4ff', // Background colour
margin: 3 // Add 3 dots of space around the code
}
})
// Browser: append to page
qrCode.append(document.getElementById('qr-container'))
// Get the generated QR code as SVG
const svgCode = await qrCode.serialize()