X Enterprises
Fmt

FmtPhone

[object Object]

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

<XAFmtPhone />

Formats US phone numbers in various styles. Renders as a tel: anchor when clickable is true.

<XAFmtPhone value="5551234567" />
<!-- Output: (555) 123-4567 -->

<XAFmtPhone value="+15551234567" format="dashes" :clickable="true" />
<!-- Output: 555-123-4567 (clickable tel: link) -->

Props

PropTypeDefaultDescription
valueString | NumberrequiredRaw phone number
format'parentheses' | 'dashes' | 'dots' | 'spaces' | 'international''parentheses'Output format
clickableBooleanfalseRender as a tel: link
fallbackString'—'Text shown when value is empty
textClassString''Additional CSS classes

AI Context

component: XAFmtPhone
package: "@xenterprises/nuxt-x-app"
auto-import: true
prefix: XA
category: Fmt
use-when: Displaying raw phone numbers in a formatted, human-readable way. Use instead of inline template expressions. Stateless and purely presentational.
Copyright © 2026