---
title: "Australia Post Barcode"
description: "The barcode on Australian letters for a lower postage price. It holds the delivery point number and, if you want, your own customer data."
url: https://gelatinui.com/components/australia-post-barcode
markdown_url: https://gelatinui.com/components/australia-post-barcode.md
access: pro
install: "npx shadcn@latest add @gelatin-ui-pro/australia-post-barcode"
version: "2026-11-11"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Australia Post Barcode

> The barcode on Australian letters for a lower postage price. It holds the delivery point number and, if you want, your own customer data.

Page: https://gelatinui.com/components/australia-post-barcode

## When to use it

Best for: Australian letters that get the lower barcoded postage price, with or without customer data.

- Pass the 8-digit DPID in `value`. The default `formatCode="11"` holds the DPID only.
- Use `formatCode="59"` for up to 5 characters of `customerInfo`, or `formatCode="62"` for up to 10.
- Put it next to the address block, on white paper with `plate={false}`.
- Use `fit` in a narrow column or a card: the code fills the width of its parent, in whole px a bar where it can. `pixelSize` sets a fixed width.

## When not to use it

- For a parcel tracking number or an order number, use the Free [Barcode](https://gelatinui.com/components/barcode.md).
- For the address text that people read, use [Address Display](https://gelatinui.com/components/address-display.md).

## Notes for agents

- Australia Post assigns the Delivery Point Identifier (DPID) of each address: take it from address data that Australia Post checked, never make it up.
- Customer data takes A to Z, a to z, 0 to 9, space, and `#`. More than 5 characters for 59 or 10 for 62 shows a help line, not bars. `onError` gets the error.
- A DPID that is not 8 digits shows a help line. The Reed-Solomon parity bars go in for you.
- With `formatCode="11"`, the code drops `customerInfo`, so a switch between formats can keep the same customer data.
- The bars have no text. The address block prints the address for people.

## Anatomy

```text
AustraliaPostBarcode
```

## API reference

### AustraliaPostBarcode

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `aria-label` | `string` |  | Defines a string value that labels the current element. The accessible name. Default the kind ("Data Matrix code"), or "<kind>: <value>" for a link. |
| `value` | `string` |  | The data etiket encodes. The 8-digit Delivery Point Identifier (DPID). |
| `pixelSize` | `number` |  | The outer width in px, quiet zone included. The height follows the symbol. |
| `fit` | `boolean` |  | Fill the width of the parent, in whole px a module when that loses one module or less (the QR Code rule), else the exact width. Default false. Wide codes (postal, PDF417) on a phone. |
| `plate` | `boolean` |  | The light plate under the code. Default true. |
| `status` | `DataStatus` |  | The load state. Default `ready`. `loading`: the skeleton while the value is not known yet. `empty`: the empty box. `error` shows as `ready`: the error box is for a value the code cannot hold. |
| `labels` | `Partial<CodeSymbolLabels>` |  | The texts of the empty and error states. |
| `onError` | `function` |  | Runs once for each new error (too much data, a character the kind cannot hold), after commit. It does not run again for the same error, and typed values are deferred: a field that shows the error should derive it from the value with the kind's encoder (cached, so free), not clear it on each change. |
| `formatCode` | `"11" \| "59" \| "62"` | "11" | The format control code: `11` Standard (default), `59` or `62` with customer data. |
| `customerInfo` | `string` | "" | The customer data of a `59` or `62` code. |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| AustraliaPostBarcode | `australia-post-barcode` |  |  |  |

## Usage

Pass the DPID, and the format and customer data when the code holds them.

```tsx title="letter-code.tsx"
import { AustraliaPostBarcode } from "@/components/pro/labels/australia-post-barcode";

export function LetterCode() {
  return (
    <AustraliaPostBarcode value="73920584" formatCode="62" customerInfo="WA48219057" plate={false} />
  );
}
```

## Compose

Rules:

- Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts.
- Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry.

## Add it

```bash
npx shadcn@latest add @gelatin-ui-pro/australia-post-barcode
```

It adds 18 registry items: 17 files, 2241 lines, and the npm packages `@mantine/hooks`, `clsx`, `etiket`, `tailwind-merge`, `tailwind-variants`.

## For AI agents

- Every item, one file: https://gelatinui.com/llms.txt
- MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp

## Related

- [Address Display](https://gelatinui.com/components/address-display.md)
- [Barcode](https://gelatinui.com/components/barcode.md)
- [Segmented Control](https://gelatinui.com/components/segmented-control.md)

## Accessibility

It is an image, named "Australia Post barcode" by default. Pass `aria-label` to say what it is, for example "Australia Post barcode for 42 Brunswick Street, Fitzroy".

The bars have no text: keep the address as text next to it.
