Barcode component

Codestype: "barcode"

Renders 1D/linear barcodes (Code 128, EAN-13, UPC-A and other bwip-js symbologies) with optional human-readable text — ideal for tickets, SKUs and shipping labels.

Edit it — this is the actual editor panel
Design JSON
{
  "title": "Barcode sample",
  "description": "A dynamic Code 128 barcode",
  "dimensions": {
    "width": 800,
    "height": 420
  },
  "background": {
    "color": "#ffffff"
  },
  "components": [
    {
      "id": "sample-barcode",
      "key": "sku",
      "type": "barcode",
      "position": {
        "x": 240,
        "y": 140
      },
      "rotation": 0,
      "size": {
        "width": 320,
        "height": 140
      },
      "dynamic": true,
      "properties": {
        "value": "012345678905",
        "format": "code128",
        "barColor": "#000000",
        "backgroundColor": "#ffffff",
        "displayValue": true,
        "opacity": 1
      }
    }
  ]
}

Like what you built? The full editor — canvas, templates and the render API — is free to start.

Open the editor

Barcode examples

Real renders of the barcode — each one is the same component with different property values, and the API payload below each preview reproduces it exactly.

Parcel tracking label

A shipping label strip with the carrier tracking number in Code 128.

API overrides for this example
{
  "sku.value": "1Z999AA10123456784"
}

Warehouse bin label

A bin location code printed for rack labelling, text kept below the bars.

API overrides for this example
{
  "sku.value": "BIN-A12-045",
  "sku.barColor": "#1E3A8A"
}

All barcode styles

Every style rendered live — each is just a different set of property values on the same component, and each has its own page with a dedicated preview, use cases and API example.

Use cases

What developers typically build with the barcode component.

  • Shipping labels with the tracking number encoded per parcel
  • Event and cinema tickets with unique entry codes
  • Retail shelf labels and price tags with product SKUs
  • Warehouse bin and asset labels generated in bulk

Use it dynamically via the API

Encode a different SKU/ticket per render via '<key>.value' (or just '<key>'); format and colors can also be overridden.

Full API request with the sample design's current values — the playground above sends only the properties you change
curl --location 'https://render.imejis.io/v1/{{YOUR_DESIGN_ID}}' \
--header 'dma-api-key: {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data '{
    "sku.value": "012345678905",
    "sku.format": "code128",
    "sku.barColor": "#000000",
    "sku.backgroundColor": "#ffffff",
    "sku.displayValue": true,
    "sku.opacity": 1
}'

Only send the properties you want to change — everything else keeps its design value. See the API documentation for all languages.

Property reference

Every property the barcode component accepts — in the editor, in design JSON, and as API overrides.

PropertyTypeEdits asDefaultDescription
valuestringtextThe raw value encoded into the barcode.
formatstringcode128code39code93ean13ean8upcaupceitf14interleaved2of5codabarmsipharmacodegs1-128"code128"Barcode symbology (bwip-js bcid), e.g. 'code128', 'ean13', 'upca'.
barColorcolor#000000"#000000"Color of the bars (dark modules).
backgroundColorcolor#ffffff"#ffffff"Background color behind the barcode.
displayValuebooleantruetrueShow the human-readable text below the bars.
textColorcolor#888888Human-readable text color (defaults to barColor).
opacitynumber11Overall component opacity from 0 (transparent) to 1 (opaque).
borderWidthnumber00Border thickness in pixels around the component.
borderColorcolortransparent"transparent"Border color (any CSS color).
borderStyle'solid' | 'dashed' | 'dotted' | 'double' | 'none'soliddasheddotteddoublenone"solid"Border line style.
borderRadiusnumber00Corner radius in pixels.
boxShadowstringtextCSS box-shadow applied to the component, e.g. "0 4px 6px rgba(0,0,0,0.1)".

Frequently Asked Questions

The format property accepts any bwip-js symbology id (bcid) — 'code128' by default, plus 'ean13', 'upca' and the rest of the bwip-js catalog.

Yes — pass '<key>.value' (or just the key) in the modifications JSON; the format and colors can be overridden per render too.

Set displayValue to false to render bars only; when shown, textColor styles the text and defaults to barColor.