---
title: "Address Display"
description: "Shows a postal address the way its country writes it: the right line order, letter case, and country name. Show it as a block or on one line."
url: https://gelatinui.com/components/address-display
markdown_url: https://gelatinui.com/components/address-display.md
access: free
install: "npx shadcn@latest add @gelatin-ui/address-display"
registry_item: https://gelatinui.com/r/address-display.json
version: "2026-11-09"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Address Display

> Shows a postal address the way its country writes it: the right line order, letter case, and country name. Show it as a block or on one line.

Page: https://gelatinui.com/components/address-display

## When to use it

Best for: A postal address from its fields, in the line order and case of its country.

- Pass the fields in `value`, with `country` as an ISO 3166-1 code.
- Use `variant="inline"` for one line in a row.
- Use `casing="postal"` for a shipping label.
- Use `hideCountry="auto"` to hide the country of the reader.

## When not to use it

- To type an address, use a [Field](https://gelatinui.com/components/field.md).

## Notes for agents

- Empty fields and their lines drop. No fields show the empty text.
- A `country` that is not two letters shows the default format and no country line, and warns in development.
- In a format with no city line (Japan), the city shows as a street line.
- Put a map link or a Copy Button next to it, not inside.

## Anatomy

```text
AddressDisplay
└─ AddressDisplayEmpty (0..n)
```

## API reference

### AddressDisplay

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `variant` | `"block" \| "inline"` | "block" |  |
| `value` | `AddressValue \| null` |  | The fields: `name`, `organization`, `street`, `city`, `region`, `postalCode`, `country`, …. |
| `hideCountry` | `"auto" \| boolean` | false | Leave out the country line: `true`, `false` (default), or `"auto"`, which leaves it out when the country is the region of the locale (a US address for an en-US reader). |
| `script` | `AddressScript` | "auto" | The line order: `auto` (default) takes the Latin-script order of a country that has one when every letter is Latin ("1-1 Marunouchi" in Japan), `local` the country's own order, `latin` the Latin order. |
| `casing` | `AddressCasing` | "as-given" | `as-given` (default): the fields keep the case the person typed ("London"). `postal`: the fields that the country's post writes in upper case ("LONDON" over "SW1A 2AA" in the United Kingdom, every line in Canada), for a shipping label. |
| `locale` | `string` |  | The BCP 47 tag of the country name and the upper case. Default: the `DisplayLocaleProvider` locale, else "en-US". |
| `children` | `ReactNode` |  | An `AddressDisplayEmpty` part: the words of no value. With a value, they are not drawn. |

### AddressDisplayEmpty

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `data-slot` | `string` |  | The `data-slot` of the root: the item's own slot (`"time-ago"`). Default `"empty-value"`. |

Also takes every prop of Base UI `UseRender`: https://base-ui.com/react/components/use-render

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| AddressDisplay | `address-display` |  |  |  |
| AddressDisplayEmpty | `address-display-empty` |  |  |  |

## Usage

Pass the address fields. Put an `AddressDisplayEmpty` inside for the words that show when there is no address.

```tsx title="order-addresses.tsx"
import { AddressDisplay, AddressDisplayEmpty } from "@/components/ui/address-display";

const ORDER = {
  shipping: {
    name: "Lena Vogel",
    street: "Unter den Linden 77",
    city: "Berlin",
    postalCode: "10117",
    country: "DE",
  },
  billing: undefined,
};

export function OrderAddresses() {
  return (
    <div className="grid grid-cols-2 gap-6 text-sm">
      <section>
        <h3 className="font-medium">Ship to</h3>
        <AddressDisplay value={ORDER.shipping} />
      </section>
      <section>
        <h3 className="font-medium">Bill to</h3>
        <AddressDisplay value={ORDER.billing}>
          <AddressDisplayEmpty>Same as shipping</AddressDisplayEmpty>
        </AddressDisplay>
      </section>
    </div>
  );
}
```

## 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/address-display
```

It adds 11 registry items: 11 files, 2084 lines, and the npm packages `@base-ui/react`, `clsx`, `react-aria-components`, `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

- [Copy Button](https://gelatinui.com/components/copy-button.md)
- [Phone Display](https://gelatinui.com/components/phone-display.md)
- [Data List](https://gelatinui.com/components/data-list.md)

## Accessibility

It renders one `address` element with one `span` per line, so a copy keeps the lines.

The country name comes from `Intl.DisplayNames` in the reader's language.

It has no role and no focus.
