View as Markdown

API reference: @salmonui/charts/barcode/dotcode

DotCodecomponent

import { DotCode } from '@salmonui/charts/barcode/dotcode';
function DotCode(props: DotCodeProps): ReactNode;

Props: DotCodeProps

DotCode props (15)
NameSignatureDescription
valuereadonly value: string;

ISO 8859-1 text, or a GS1 element string with gs1.

columnsoptionalreadonly columns?: number | undefined;

Symbol width in dot columns, 5 to 200 (default automatic, about 3:2).

gs1optionalreadonly gs1?: boolean | undefined;

GS1 DotCode: value is an element string (01)…(10)… (FNC1).

textoptionalinheritedtext?: string | boolean;

Human-readable text under the symbol: true shows the value, a string replaces it, false hides it.

moduleSizeoptionalinheritedmoduleSize?: number;

Module (narrow bar or dot) size in px.

widthoptionalinheritedwidth?: number;

Total width in px (overrides moduleSize).

quietZoneoptionalinheritedquietZone?: boolean;

Keep the quiet zone (default true).

coloroptionalinheritedcolor?: string;

Bar color: a data color, default #000000 (scanners need dark on light in every color scheme).

backgroundoptionalinheritedbackground?: string;

Background color: a data color, default #ffffff.

labeloptionalinheritedlabel?: string;

Accessible name; default the encoded value.

invalidLabeloptionalinheritedinvalidLabel?: string;

Accessible name when the value cannot be encoded ({reason} is replaced). Default Invalid barcode: {reason}.

onInvalidoptionalinheritedonInvalid?: ((event: BarcodeInvalidEvent) => void);
refoptionalinheritedref?: Ref<BarcodeApi>;
classNameoptionalinheritedclassName?: string;
styleoptionalinheritedstyle?: CSSProperties;