Skip to main content

SyncsnapQrCode

SyncsnapQrCode renders a QR code image that encodes the upload URL for a given job. The URL is built with createUploadUrl so the user’s phone opens the correct SyncSnap upload page with the job ID.

When to use

  • SyncsnapUploadButton — Use when you want the default button + dialog; it uses the QR internally.
  • SyncsnapQrCode — Use when you build your own UI (e.g. custom modal, different layout) and only need the QR image.
You must have a jobId (from creating a job via your backend or useSyncsnapJob) before rendering this component.

Basic usage

Renders a 240×240 QR code by default. The encoded URL is https://upload.syncsnap.xyz/?job_id=<jobId> unless you pass baseUrl.

Props

Custom base URL

For staging or a custom upload host:

With useSyncsnapJob

Typical pattern: start a job with the hook, then show the QR when you have a jobId:
The component renders nothing until the QR data URL is generated (brief delay); it does not show a loading state by default. Add your own loading UI if needed.