View as Markdown

API reference: @salmonui/charts/barcode/gs1-databar

Gs1DataBarcomponent

import { Gs1DataBar } from '@salmonui/charts/barcode/gs1-databar';
function Gs1DataBar(props: Gs1DataBarProps): ReactNode;

Props: Gs1DataBarProps

Gs1DataBar props (16)
NameSignatureDescription
textoptionalinheritedtext?: string | boolean;

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

valuereadonly value: string;

A GTIN (13 or 14 digits) or, for Expanded, a GS1 element string (01)…(3202)….

variantoptionalreadonly variant?: Gs1DataBarVariant | undefined;

Default 'omnidirectional'.

segmentsPerRowoptionalreadonly segmentsPerRow?: number | undefined;

Expanded Stacked: segments (symbol characters) per row, even, 2 to 22 (default 4).

heightoptionalreadonly height?: number | undefined;

Total height in px: scales the rows.

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;