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

> 10 exported symbols of @salmonui/charts/barcode/gs1-databar: 1 component, 1 function, 5 interfaces and 3 types.

Canonical: https://salmonui.dev/docs/reference/charts/barcode-gs1-databar

```ts
import { … } from '@salmonui/charts/barcode/gs1-databar';
```

## Components

### Gs1DataBar

Kind: component

Page: https://salmonui.dev/docs/reference/charts/barcode-gs1-databar/Gs1DataBar

```ts
function Gs1DataBar(props: Gs1DataBarProps): ReactNode;
```

Props: [`Gs1DataBarProps`](https://salmonui.dev/docs/reference/charts/barcode-gs1-databar/Gs1DataBarProps) (its members are the props)

## Interfaces

### Gs1DataBarProps

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/barcode-gs1-databar/Gs1DataBarProps

```ts
interface Gs1DataBarProps extends SymbolBaseProps {
    readonly value: string;
    readonly variant?: Gs1DataBarVariant | undefined;
    readonly segmentsPerRow?: number | undefined;
    readonly height?: number | undefined;
}
```

Members (16):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `text` | `text?: string \| boolean;` | optional, inherited | Human-readable text under the symbol: `true` shows the value, a string replaces it, `false` hides it. |
| `value` | `readonly value: string;` |  | A GTIN (13 or 14 digits) or, for Expanded, a GS1 element string `(01)…(3202)…`. |
| `variant` | `readonly variant?: Gs1DataBarVariant \| undefined;` | optional | Default `'omnidirectional'`. |
| `segmentsPerRow` | `readonly segmentsPerRow?: number \| undefined;` | optional | Expanded Stacked: segments (symbol characters) per row, even, 2 to 22 (default 4). |
| `height` | `readonly height?: number \| undefined;` | optional | Total height in px: scales the rows. |
| `moduleSize` | `moduleSize?: number;` | optional, inherited | Module (narrow bar or dot) size in px. |
| `width` | `width?: number;` | optional, inherited | Total width in px (overrides `moduleSize`). |
| `quietZone` | `quietZone?: boolean;` | optional, inherited | Keep the quiet zone (default true). |
| `color` | `color?: string;` | optional, inherited | Bar color: a data color, default `#000000` (scanners need dark on light in every color scheme). |
| `background` | `background?: string;` | optional, inherited | Background color: a data color, default `#ffffff`. |
| `label` | `label?: string;` | optional, inherited | Accessible name; default the encoded value. |
| `invalidLabel` | `invalidLabel?: string;` | optional, inherited | Accessible name when the value cannot be encoded (`{reason}` is replaced). Default `Invalid barcode: {reason}`. |
| `onInvalid` | `onInvalid?: ((event: BarcodeInvalidEvent) => void);` | optional, inherited |  |
| `ref` | `ref?: Ref<BarcodeApi>;` | optional, inherited |  |
| `className` | `className?: string;` | optional, inherited |  |
| `style` | `style?: CSSProperties;` | optional, inherited |  |

## Types

### Gs1DataBarVariant

Kind: type

Page: https://salmonui.dev/docs/reference/charts/barcode-gs1-databar/Gs1DataBarVariant

```ts
type Gs1DataBarVariant = DataBarVariant;
```

## Re-exported entry points

- [@salmonui/charts/chart/export](https://salmonui.dev/docs/reference/charts/chart-export.md): 3 symbols: 1 function, 1 interface and 1 type
  `ExportVisualizationsOptions`, `ExportableVisualization`, `exportVisualizations`
- [@salmonui/charts/barcode](https://salmonui.dev/docs/reference/charts/barcode.md): 4 symbols: 3 interfaces and 1 type
  `BarcodeApi`, `BarcodeExportOptions`, `BarcodeImageFormat`, `BarcodeInvalidEvent`
