Configure
Emit assignment 26 before the first octet segment to explicitly declare UTF-8.
Corners Square (Finder squares)
Corners Dot (Finder dots)
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 type {QRCodeSVGOptions} from '@qrcodesdk/core';
import {QRCodeSVG, type QRCodeDownloadHandle} from '@qrcodesdk/react';
export function QRCodeExample() {
const data = "https://qrcodesdk.dev";
const qrcode = useRef<QRCodeDownloadHandle>(null);
const options: QRCodeSVGOptions = {
size: 8,
margin: 4,
};
return (
<>
<button
type="button"
onClick={() => qrcode.current?.download('qrcodesdk')}
>
Download SVG
</button>
<QRCodeSVG ref={qrcode} data={data} options={options} />
</>
);
}