Playground
Finder patterns
Alignment patterns
Optimize mixed-mode segments
Auto mode can combine encoding modes to fit more data. Uses additional processing time. Explicit numeric, alphanumeric, and octet modes bypass this option.
UTF-8 ECI
Emit assignment 26 before the first octet segment to explicitly declare UTF-8.
React
import {useRef} from 'react';
import {type QRCodeDownloadHandle, QRCodeSVG, type QRCodeSVGOptions} from '@qrcodesdk/react';
export function QRCodeExample() {
const payload = 'https://qrcodesdk.dev';
const qrcode = useRef<QRCodeDownloadHandle>(null);
const options: QRCodeSVGOptions = {
style: {
moduleSize: 8,
quietZone: 4,
},
};
return (
<>
<button type="button" onClick={() => qrcode.current?.download('qrcodesdk')}>
Download SVG
</button>
<QRCodeSVG ref={qrcode} payload={payload} options={options} />
</>
);
}