# BarcodeDrawingOptions Interface

> BarcodeDrawingOptions interface in the TX Sheet Control TypeScript API for the browser, with its syntax and a TypeScript example.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Interface
- **Path:** TX Sheet Control > API Reference > TypeScript API > Browser Editor > BarcodeDrawingOptions Interface
- **1093 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodedrawingoptions/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodedrawingoptions/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodedrawingoptions/llms-full.txt

---

Floating barcode settings with ordinary drawing placement. Inherits every BarcodeOptions setting.

Package: `@txtextcontrol/tx-sheet-control`.

### Syntax

```typescript
interface BarcodeDrawingOptions extends BarcodeOptions {
    anchor?: Anchor;
    size?: Size;
    name?: string;
    altText?: string;
    rotation?: number;
}
```

### Remarks

Settings are detached snapshots. Cell values and formulas remain available beneath the symbol. Sources resolve after calculation and mail merge. See [Barcodes and QR Codes](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/barcodes/llms-full.txt) for validation, supported payloads and XLSX behavior.

- [anchor](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodedrawingoptions/anchor-property/llms-full.txt) — Anchor cell and optional CSS-pixel offsets. Defaults to A1.
- [size](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodedrawingoptions/size-property/llms-full.txt) — Width and height in unscaled CSS pixels. Defaults to 160×160 for QR or 280×100 for linear codes.
- [name](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodedrawingoptions/name-property/llms-full.txt) — Drawing name; defaults to Barcode.
- [altText](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodedrawingoptions/alttext-property/llms-full.txt) — Accessibility description for the drawing.
- [rotation](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodedrawingoptions/rotation-property/llms-full.txt) — Clockwise rotation in degrees.

Inherited settings: [BarcodeOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodeoptions/llms-full.txt).

### Examples

Create a barcode from application data and retain its editable workbook settings.

```typescript
import { Workbook } from '@txtextcontrol/tx-sheet-control';
import type { BarcodeDrawingOptions } from '@txtextcontrol/tx-sheet-control';

const book = new Workbook();
const sheet = book.sheets.at(0);
sheet.cell('A1').setText('001042');
const options: BarcodeDrawingOptions = {
    symbology: 'code128', source: 'A1',
    anchor: { cell: 'D4', offsetX: 8, offsetY: 8 },
    size: { width: 240, height: 100 }, name: 'Invoice barcode',
    altText: 'Invoice identifier', rotation: 0,
};
const drawing = sheet.drawings.addBarcode(options);
const snapshot = drawing.barcode;
if (snapshot) {
    drawing.updateBarcode({ ...snapshot, showText: false });
}
```

### Additional and Inherited Members

| Member | Ownership |
|---|---|
| [symbology](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodeoptions/symbology-property/llms-full.txt) | Inherited from [BarcodeOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodeoptions/llms-full.txt). |
| [source](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodeoptions/source-property/llms-full.txt) | Inherited from [BarcodeOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodeoptions/llms-full.txt). |
| [value](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodeoptions/value-property/llms-full.txt) | Inherited from [BarcodeOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodeoptions/llms-full.txt). |
| [showText](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodeoptions/showtext-property/llms-full.txt) | Inherited from [BarcodeOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodeoptions/llms-full.txt). |
| [foreground](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodeoptions/foreground-property/llms-full.txt) | Inherited from [BarcodeOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodeoptions/llms-full.txt). |
| [background](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodeoptions/background-property/llms-full.txt) | Inherited from [BarcodeOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodeoptions/llms-full.txt). |
| [errorCorrection](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodeoptions/errorcorrection-property/llms-full.txt) | Inherited from [BarcodeOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodeoptions/llms-full.txt). |
| [version](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodeoptions/version-property/llms-full.txt) | Inherited from [BarcodeOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodeoptions/llms-full.txt). |

---

## In This Section

- [BarcodeDrawingOptions.altText Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodedrawingoptions/alttext-property/llms-full.txt): BarcodeDrawingOptions.altText property in the TX Sheet Control TypeScript API for the browser: Accessibility description for the drawing.
- [BarcodeDrawingOptions.anchor Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodedrawingoptions/anchor-property/llms-full.txt): BarcodeDrawingOptions.anchor property in the TX Sheet Control TypeScript API for the browser: Anchor cell and optional CSS-pixel offsets. Defaults to A1.
- [BarcodeDrawingOptions.name Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodedrawingoptions/name-property/llms-full.txt): BarcodeDrawingOptions.name property in the TX Sheet Control TypeScript API for the browser: Drawing name; defaults to Barcode.
- [BarcodeDrawingOptions.rotation Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodedrawingoptions/rotation-property/llms-full.txt): BarcodeDrawingOptions.rotation property in the TX Sheet Control TypeScript API for the browser: Clockwise rotation in degrees.
- [BarcodeDrawingOptions.size Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodedrawingoptions/size-property/llms-full.txt): BarcodeDrawingOptions.size property in the TX Sheet Control TypeScript API for the browser, with its type Size and a TypeScript example.

---

## Nearby

- **Previous:** [BarcodeOptions.version Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodeoptions/version-property/llms-full.txt)
- **Next:** [BarcodeDrawingOptions.anchor Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodedrawingoptions/anchor-property/llms-full.txt)
