# ngx-barcode6

> An angular component for Angular 17 - 21 for creating 1-D barcodes based on Lindell's JsBarcode

Latest version **1.21.1** (published 2026-01-29) · MIT license · 27.2K weekly downloads

## Install

```sh
npm install ngx-barcode6
pnpm add ngx-barcode6
yarn add ngx-barcode6
bun add ngx-barcode6
```

## Health

**Score 65/100 (B)** — status: stable.

Positive: has types; esm support; no vulnerabilities.

## Facts

| | |
|---|---|
| Version | 1.21.1 |
| Published | 2026-01-29 |
| First published | 2018-10-05 |
| Weekly downloads | 27.2K |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 25 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 35 |
| Author | Edgar Giese |
| Maintainers | efgiese |
| Keywords | Angular, Angular17, Angular18, Angular19, Angular20, Angular21, barcode, jsbarcode |

## Links

- npm: https://www.npmjs.com/package/ngx-barcode6
- Repository: https://github.com/efgiese/ngx-barcode6
- Homepage: https://github.com/efgiese/ngx-barcode6#readme
- Issues: https://github.com/efgiese/ngx-barcode6/issues
- npm.io page: https://npm.io/package/ngx-barcode6

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^2.3.0

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 1.21.1 (latest) — 2026-01-29
- 1.20.1 — 2025-07-04
- 1.0.26 — 2025-01-02
- 1.0.25 — 2024-06-25
- 1.0.24 — 2024-01-23
- 1.0.23 — 2023-06-10
- 1.0.22 — 2023-01-22
- 1.0.21 — 2022-08-18
- 1.0.20 — 2022-01-21
- 1.0.19 — 2021-11-20
- 1.0.18 — 2021-08-27
- 1.0.15 — 2021-03-05
- 1.0.14 — 2021-03-05
- 1.0.13 — 2020-09-14
- 1.0.12 — 2020-07-14
- … 19 more at https://npm.io/package/ngx-barcode6/versions

## README

# ngx-barcode6

An angular component for Angular 17 - 21 for creating 1-D barcodes based on [Lindell's JsBarcode](https://github.com/lindell/JsBarcode).

This is forked from [yobryon/ngx-barcode](https://github.com/yobryon/ngx-barcode) and upgraded to Angular 6 works on Angular 21.x.

## Supported barcodes

Supports all barcode formats provided by [JsBarcode](https://github.com/lindell/JsBarcode/wiki)

- CODE128
  - CODE128 (automatic mode switching)
  - CODE128 A/B/C (force mode)
- EAN / UPC
  - EAN13
  - UPC
  - EAN8
  - EAN5
  - EAN2
- CODE39
- ITF
  - ITF
  - ITF-14
- MSI
  - MSI10
  - MSI11
  - MSI1010
  - MSI1110
- Pharmacode
- Codabar

## Installation

To use ngx-barcode6 in your project, install it via npm:

```bash
npm install --save ngx-barcode6 jsbarcode@3.12.1
```

For Angular 8 use `ngx-barcode6@1.0.10`.

```bash
npm install --save ngx-barcode6@1.0.10 jsbarcode@3.11.5
```

For Angular 10 try `ngx-barcode6@1.0.12`.

Because of Angular 16 and Nodejs 18 i think you can not use this actual version for lower than Angular 15.

From now on, I'm changing the release naming. The second digit in the version indicates the Angular version.

## Usage

Since Angular 19 standalone: true is standard:

```typescript
import { CommonModule } from '@angular/common';
import { ChangeDetectionStrategy, Component, signal } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { NgxBarcode6 } from 'ngx-barcode6';

@Component({
  selector: 'app-root',
  imports: [CommonModule, FormsModule, NgxBarcode6],
  templateUrl: './app.html',
  styleUrls: ['./app.css'],
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class App {
  ...
}
```

Once the library is imported, you can use the ngx-barcode6 component in your Angular application:

```xml
<div style="text-align: center">
  <ngx-barcode6
    [bc-format]="selectedBarcodeObj().value"
    [bc-width]="selectedWidth()"
    [bc-height]="selectedHeight()"
    [bc-font-size]="selectedFontSize()"
    [bc-value]="selectedBarcodeObj().example"
    [bc-display-value]="true"
  >
  </ngx-barcode6>
</div>
```

## License

MIT © [Bryon Williams](mailto:bryon.williams@live.com), [Edgar Giese](mailto:edgar@egiese.de)

---
_Source: https://npm.io/package/ngx-barcode6 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
