# QRCodeProps (@salmonui/charts/barcode)

> The QRCodeProps interface of @salmonui/charts/barcode.

Canonical: https://salmonui.dev/docs/reference/charts/barcode/QRCodeProps

```ts
import type { QRCodeProps } from '@salmonui/charts/barcode';
```

Entry index: https://salmonui.dev/docs/reference/charts/barcode (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/charts/barcode.md).

## Reference

Kind: interface

```ts
interface QRCodeProps extends SvgPassthrough {
    readonly value: string;
    readonly errorCorrection?: QRErrorCorrection | undefined;
    readonly version?: 'auto' | number | undefined;
    readonly mode?: QRMode | undefined;
    readonly gs1?: boolean | undefined;
    readonly mask?: number | undefined;
    readonly logo?: ReactNode;
    readonly moduleSize?: number | undefined;
    readonly width?: number | undefined;
    readonly quietZone?: boolean | undefined;
    readonly text?: boolean | string | undefined;
    readonly color?: string | undefined;
    readonly background?: string | undefined;
    readonly label?: string | undefined;
    readonly invalidLabel?: string | undefined;
    readonly onInvalid?: ((event: BarcodeInvalidEvent) => void) | undefined;
    readonly ref?: Ref<QRCodeApi> | undefined;
    readonly className?: string | undefined;
    readonly style?: CSSProperties | undefined;
}
```

Members (19):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `value` | `readonly value: string;` |  |  |
| `errorCorrection` | `readonly errorCorrection?: QRErrorCorrection \| undefined;` | optional | Default `'m'`, or `'h'` with a `logo`. |
| `version` | `readonly version?: 'auto' \| number \| undefined;` | optional | `'auto'` (default): the smallest version 1..40 that fits. |
| `mode` | `readonly mode?: QRMode \| undefined;` | optional | Default `'auto'`: numeric, alphanumeric or byte (UTF-8), whichever encodes the whole value. |
| `gs1` | `readonly gs1?: boolean \| undefined;` | optional | GS1 QR Code: `value` is an element string `(01)…(10)…`. |
| `mask` | `readonly mask?: number \| undefined;` | optional | Mask 0..7 (default: the lowest ISO penalty). |
| `logo` | `readonly logo?: ReactNode;` | optional | Centered over a cleared area (about 22 % of the symbol width); raises the default error correction to `'h'`. |
| `moduleSize` | `readonly moduleSize?: number \| undefined;` | optional | Module size in px (default 4). |
| `width` | `readonly width?: number \| undefined;` | optional | Total width (and height) in px; overrides `moduleSize`. |
| `quietZone` | `readonly quietZone?: boolean \| undefined;` | optional |  |
| `text` | `readonly text?: boolean \| string \| undefined;` | optional | Optional caption under the symbol: `true` shows the value. |
| `color` | `readonly color?: string \| undefined;` | optional | Module color: a data color, default `#000000`. |
| `background` | `readonly background?: string \| undefined;` | optional |  |
| `label` | `readonly label?: string \| undefined;` | optional | Accessible name; default the encoded value. |
| `invalidLabel` | `readonly invalidLabel?: string \| undefined;` | optional |  |
| `onInvalid` | `readonly onInvalid?: ((event: BarcodeInvalidEvent) => void) \| undefined;` | optional |  |
| `ref` | `readonly ref?: Ref<QRCodeApi> \| undefined;` | optional |  |
| `className` | `readonly className?: string \| undefined;` | optional |  |
| `style` | `readonly style?: CSSProperties \| undefined;` | optional |  |
