DDS/Components/QR Code

QR Code

Display

Dependency-free SVG QR code generator. Implements ISO 18004 standard versions 1–6, ECC level L (up to 134 bytes).

Playground

Controls

Props

PropTypeDefaultDescription
value*stringText/URL to encode (max 134 bytes for V6-L).
sizenumber200Rendered SVG size in pixels.
moduleSizenumber8Size of each module (cell) in px.
foregroundstring"currentColor"Color of dark modules.
backgroundstring"transparent"Background color.
quietnumber2Quiet zone size (modules).
labelstringText displayed below the QR code.

Examples

URL
dds.dev
vue
<DsQRCode
  value="https://dds.dev"
  :size="160"
  label="dds.dev"
/>
Short text
vue
<DsQRCode
  value="Hello, DDS!"
  :size="160"
/>
Custom colors
vue
<DsQRCode
  value="DDS Design"
  :size="160"
  foreground="#7f00ff"
  background="#f0e6ff"
/>

Skeleton

Use DsQRCodeSkeleton as a loading placeholder while content is being fetched.

Default
vue
<DsQRCodeSkeleton />

Accessibility

  • SVG with role="img" and aria-label describing the content.
  • Always provide a label or alternative text near the QR code.