API Reference

DataModulesSettings

Controls the appearance of the small data squares that encode the actual QR information. These are every module that is not part of the three corner finder patterns.

Props

PropTypeDefaultDescription
styleDataModulesStyle'square'The shape of each data module.
colorstring'#000000'Fill color applied when no gradient is set on the parent component.
randomSizebooleanfalseRandomize module sizes for a scattered look. Only works with: square, pinched-square, circle, diamond, star, heart, hashtag.
sizenumber1Fixed size multiplier (0–1). Recommended range: 0.75–1. Only applies when randomSize is false.
lineWidthnumber1 (0.5 for circuit-board)Stroke width for connected-shape styles: vertical-line, horizontal-line, rounded (sub-1), circuit-board.

Style gallery

Click a style to see it live:

vue
<VueQRCode
  value="https://nuxt.com"
  :data-modules-settings="{
    style: 'rounded',
    color: '#10b981',
  }"
/>

DataModulesStyle values

ts
type DataModulesStyle =
  | 'square'
  | 'square-sm'
  | 'pinched-square'
  | 'rounded'
  | 'leaf'
  | 'vertical-line'
  | 'horizontal-line'
  | 'circuit-board'
  | 'circle'
  | 'diamond'
  | 'star'
  | 'heart'
  | 'hashtag'
randomSize and size only take effect for: square, pinched-square, circle, diamond, star, heart, hashtag.
lineWidth only applies to: vertical-line, horizontal-line, rounded (when <1), and circuit-board.