Generate custom QR codes in any platform with just a few lines of code. Full TypeScript support included.
npm i @intosoft/qrcodeimport { generateSVGString } from "@intosoft/qrcode";const svg = generateSVGString({
value: 'https://example.com',
length: 300,
shapes: {
body: 'dots',
eyeFrame: 'rounded',
eyeball: 'circle'
},
colors: {
body: '#667eea',
eyeFrame: { topLeft: '#764ba2' }
}
});valueRequiredThe data to encode in the QR code (URL, text, etc.)
Type: string
lengthSize of the QR code in pixels (default: 300)
Type: number
shapes.bodyBody shape: square, dots, rounded, mosaic, etc. (31+ options)
Type: string
shapes.eyeFrameEye frame shape: square, circle, rounded, leaf, etc.
Type: string
shapes.eyeballEyeball shape: matches eyeFrame options
Type: string
colors.bodyBody color as hex, or gradient object
Type: string | Gradient
logo.urlLogo image URL (PNG, JPEG, SVG, WebP)
Type: string
logo.sizeLogo size in QR cells (default: 40)
Type: number
logo.paddingWhite space around logo (default: 0)
Type: number
logo.borderRadiusLogo corner radius in pixels
Type: number
errorCorrectionError correction: L, M, Q, H (default: M)
Type: string
Install the package and start generating custom QR codes in minutes