React components API
SyncsnapUploadButton
Import:import { SyncsnapUploadButton } from "@syncsnap/react";
Props extend UseSyncsnapJobOptions (e.g. createJobUrl, getJobUrl, getWaitForCompletionUrl, onCompleted). In addition:
| Prop | Type | Default | Description |
|---|---|---|---|
buttonText | string | "Start upload" | Button label. |
className | string | — | Wrapper className. |
qrSize | number | 240 | QR size in pixels. |
qrBaseUrl | string | — | Base URL for upload page (see createUploadUrl). |
errorCorrectionLevel | "L" | "M" | "Q" | "H" | "M" | QR error correction. |
SyncsnapQrCode
Import:import { SyncsnapQrCode } from "@syncsnap/react";
| Prop | Type | Default | Description |
|---|---|---|---|
jobId | string | required | Job ID. |
baseUrl | string | "https://upload.syncsnap.xyz/" | Upload page base URL. |
size | number | 240 | QR width/height in pixels. |
className | string | — | Applied to the <img>. |
errorCorrectionLevel | "L" | "M" | "Q" | "H" | "M" | QR error correction. |