Skip to content

Function: phoneField()

ts
function phoneField(props: UiPhoneFieldProps): Element;

Defined in: src/UI/blocks/phoneField.tsx:55

Phone input field component for phone number input with validation.

Parameters

ParameterTypeDescription
propsUiPhoneFieldPropsConfiguration object

Returns

Element

Examples

Basic usage with required props

phoneField({
  name: 'phone',
  label: 'Phone Number'
});

Usage with placeholder and validation

phoneField({
  name: 'contactNumber',
  label: 'Contact Number',
  placeholder: '+1 555 123 4567',
  required: true,
  invalid: 'Please enter a valid phone number'
});

Usage with default value

phoneField({
  name: 'mobile',
  label: 'Mobile Phone',
  defaultValue: '+1234567890',
  placeholder: 'Enter your mobile number',
  required: true,
  disabled: false
});

Matterway Assistant SDK Documentation