Configure
Emit assignment 26 before the first octet segment to explicitly declare UTF-8.
Finder outer ring
Finder center
Shape modules, upload a center image or use the QRCodeSDK logo, preview React, Vue, Svelte, or Angular components, then copy the code into your app.
Emit assignment 26 before the first octet segment to explicitly declare UTF-8.
import {useRef} from 'react';
import {QRCodeSVG, type QRCodeSVGOptions, type QRCodeDownloadHandle} 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} />
</>
);
}