X Enterprises
Fmt

FmtAddress

Renders a postal address in block or inline format with an optional map link.

Fmt

The Fmt category provides stateless display formatters. Each component is a thin wrapper around native Intl APIs, VueUse, or Nuxt utilities — they accept a raw value and render formatted output without any side effects.

Components

<XAFmtAddress />

Renders a postal address as a block (multi-line) or inline (comma-separated) format. Accepts either a structured address object or individual field props. Optionally appends a map link.

<!-- Object mode -->
<XAFmtAddress :address="contact.address" :show-map-link="true" />

<!-- Field mode -->
<XAFmtAddress
  street="123 Main St"
  city="Springfield"
  state="IL"
  zip="62701"
  :inline="true"
  :show-map-link="true"
  map-provider="google"
/>

Props

PropTypeDefaultDescription
addressObjectnullAddress object (supports street, street2, city, state, zip, country and common aliases)
streetString''Street line 1
street2String''Street line 2 / unit
cityString''City
stateString''State / region
zipString''Postal code
countryString''Country
inlineBooleanfalseSingle-line comma-separated format
showCountryBooleanfalseInclude country in output
showMapLinkBooleantrueAppend a "View on Map" link
mapLinkTextString''Custom map link label
mapProvider'google' | 'apple''google'Map provider for the link URL

AI Context

component: XAFmtAddress
package: "@xenterprises/nuxt-x-app"
auto-import: true
prefix: XA
category: Fmt
use-when: Displaying postal addresses in block or inline format. Accepts an address object or individual field props. Stateless and purely presentational.
Copyright © 2026