Skip to content
Accessibility: Full
Translations: Not Needed

Input Phone (Inline)

Minimalist phone input that appears as text until focused, perfect for in-place editing.

Required Prop

Set inline to true to enable inline mode.

Basic Usage

+1 555-123-4567

Vue
html
<template>
  <HLInputPhone id="input-phone-inline" inline v-model:countryCode="countryCode" v-model:value="phone" />
</template>
<script setup lang="ts">
  import { HLInputPhone } from '@platform-ui/highrise'
  import { ref } from 'vue'
  const phone = ref('+91845403166')
  const countryCode = ref('IN')
</script>

Inline with Edit Actions and CTA

Inline phone input with confirm and cancel actions, custom edit actions, and saved icon.

(555) 123-4567

html
<template>
  <HLInputPhone
    ref="inputRef"
    inline
    :showInlineCTA="true"
    v-model:countryCode="countryCode"
    v-model:value="phone"
    @confirm="handleConfirm"
    @cancel="handleCancel"
  >
    <!-- Always visible suffix icons -->
    <template #suffix>
      <HLIcon>
        <MessageQuestionCircleIcon />
      </HLIcon>
    </template>

    <!-- Hover-only edit actions -->
    <template #edit-actions>
      <HLIcon @click="handleEdit">
        <Edit02Icon />
      </HLIcon>
      <HLIcon>
        <PhoneIcon />
      </HLIcon>
      <HLIcon @click="handleMail">
        <Mail01Icon />
      </HLIcon>
    </template>
  </HLInputPhone>
</template>
ts
import { HLInputPhone, HLIcon } from '@platform-ui/highrise'
import { Edit02Icon, PhoneIcon, Mail01Icon, MessageQuestionCircleIcon } from '@gohighlevel/ghl-icons/24/outline'
import { ref } from 'vue'

const phone = ref('+1 555-123-4567')
const countryCode = ref('US')
const inputRef = ref(null)

const handleConfirm = value => {
  // Trigger saved icon using the exposed method (accessed via inputRef)
  inputRef.value?.inputRef?.triggerSavedIcon()
  // Clear saved icon after 2 seconds
  setTimeout(() => {
    inputRef.value?.inputRef?.clearSavedIcon()
  }, 2000)
  console.log('Phone confirmed:', value)
}

const handleCancel = () => {
  console.log('Phone edit cancelled, value automatically restored')
}

const handleEdit = () => {
  console.log('Edit action clicked')
}

const handleMail = () => {
  console.log('Mail action clicked')
}

Accessibility

  • Label the phone field with aria-labelledby / aria-label, and reference format instructions via aria-describedby.
  • When the country picker opens, keep the trigger's aria-expanded / aria-controls values synchronized with the dial-code list id.
  • Mark validation issues with aria-invalid="true" on the text input.

Imports

ts
import { HLInputPhone, HLForm, HLFormItem } from '@platform-ui/highrise'

Props

Inline Props

NameTypeDefaultDescription
inlinebooleanfalseMust be set to true to enable inline mode. Whether the input is inline
showInlineCTAbooleanfalseShows confirm/cancel buttons during inline editing
showInlineBottomBorderbooleantrueControls bottom border visibility in inline mode
showSavedIconbooleanfalseDeprecated: Use triggerSavedIcon() and clearSavedIcon() methods instead to programmatically control saved icon visibility

Other Props

NameTypeDefaultDescription
id *string | undefinedundefinedUnique identifier for the input
countryCodestring | undefinedundefinedTwo-letter country code (ISO 3166-1 alpha-2).
valuestring | undefinedundefinedPhone number value
disabledbooleanfalseWhether the input is disabled
disableCountryPickerbooleanfalseWhether to disable the country selection dropdown
autocompletebooleanfalseEnable/disable browser autocomplete
size'lg' | 'md' | 'sm' | 'xs' | '2xs' | '3xs''sm'Size of the input
format'national' | 'international''nationalFormat'Phone number format
dropdownHeightstring'32rem'Height of the dropdown
showSavedIconbooleanfalseDeprecated: Use triggerSavedIcon() and clearSavedIcon() methods instead to programmatically control saved icon visibility

Emits

Inline Emits

NameParametersDescription
@confirm(value: string)Emitted when user confirms the input in inline mode. The confirmed value is passed as the parameter
@cancel() => voidEmitted when user cancels the input in inline mode. The value is automatically restored to the previous value

Common Emits

NameParametersDescription
@internationalFormat(phone: string)Emitted when phone number is formatted internationally
@nationalFormat(phone: string)Emitted when phone number is formatted nationally
@isValid(valid: boolean)Emitted when phone number validation status changes
@update:countryCode(code: string)Emitted when country code changes
@update:value(value: string)Emitted when phone number value changes
@focus(event: FocusEvent)Emitted when the input receives focus
@blur(event: FocusEvent)Emitted when the input loses focus
@scrollTo(event: Event)Emitted when scrolling occurs in the input

Slots

Inline Slots

NameDescription
edit-actionsContent to show on hover in inline mode

Other Slots

NameDescription
suffixContent to show after the input (always visible)

Methods

Inline Methods

MethodTypeReturnsDescription
triggerSavedIcon()() => voidvoidProgrammatically triggers the saved icon to appear. Useful for showing confirmation after async operations
clearSavedIcon()() => voidvoidProgrammatically clears the saved icon. Useful for resetting the saved state

Common Methods

NameParametersReturnsDescription
focus() => voidvoidFocus the input number element
blur() => voidvoidBlur the input number element
clear() => voidvoidClear the input number element
select() => voidvoidSelect the input number element
scrollTo() => voidvoidScroll to the input number element