Vivid API

Dial Pad

Dial Pad allows users to enter or dial phone numbers.

Usage

import { registerDialPad } from '@vonage/vivid-api';
registerDialPad('your-prefix');

Value

To set the value of the input, use the value attribute to set the text displayed in the input.

Pattern

Use the pattern attribute to set the regex string of allowed characters in the input.
Read more about vwc-text-field validation. It defaults to ^[0-9#*]*$ (key pad buttons).

API Reference

Properties

PropertyTypeDefaultDescription
autofocusbooleanIndicates that an element should be focused on page load, or when the Dialog that it is part of is displayed. When `no-input` attribute is specified, it will be the first digit button. Otherwise, the text field will be focused.`
callActivebooleanControls the active state of the call
callButtonLabelstringControls the call button label
deleteAriaLabelstringThe aria-label for the delete button
disabledbooleanControls the disabled state of the dial pad
endCallButtonLabelstringControls the end call button label
helperTextstringControls the helper text displayed below the phone input element
noCallbooleanRemoves the call button and functionality
noInputbooleanRemoves the phone input element
patternstringRegular expression to validate the value of the input element
pendingbooleanControls the pending state
placeholderstringIndicates the placeholder's text.
size'condensed' | 'normal'Controls the vertical size of the dial pad
value
(modelValue)
stringValue of the phone input element
PropertyTypeDefaultDescription
autofocusbooleanIndicates that an element should be focused on page load, or when the Dialog that it is part of is displayed. When `no-input` attribute is specified, it will be the first digit button. Otherwise, the text field will be focused.`
call-activebooleanControls the active state of the call
call-button-labelstringControls the call button label
delete-aria-labelstringThe aria-label for the delete button
disabledbooleanControls the disabled state of the dial pad
end-call-button-labelstringControls the end call button label
helper-textstringControls the helper text displayed below the phone input element
no-callbooleanRemoves the call button and functionality
no-inputbooleanRemoves the phone input element
patternstringRegular expression to validate the value of the input element
pendingbooleanControls the pending state
placeholderstringIndicates the placeholder's text.
size'condensed' | 'normal'Controls the vertical size of the dial pad
valuestringValue of the phone input element

Events

NameTypeDescription
blurCustomEvent<undefined>Emitted when the text field loses focus
changeCustomEvent<undefined>Emitted when the text field value changes
dialCustomEvent<undefined>Emitted when the call button is clicked
end-callCustomEvent<undefined>Emitted when the end call button is clicked
focusCustomEvent<undefined>Emitted when the text field receives focus
inputCustomEvent<undefined>Emitted when the text field value changes
keypad-clickCustomEvent<HTMLElement>Emitted when a digit button is clicked
NameTypeDescription
blurCustomEvent<undefined>Emitted when the text field loses focus
changeCustomEvent<undefined>Emitted when the text field value changes
dialCustomEvent<undefined>Emitted when the call button is clicked
end-callCustomEvent<undefined>Emitted when the end call button is clicked
focusCustomEvent<undefined>Emitted when the text field receives focus
inputCustomEvent<undefined>Emitted when the text field value changes
keypad-clickCustomEvent<HTMLElement>Emitted when a digit button is clicked

Methods

NameParamsReturnsDescription
focusvoidMoves focus into the Dial Pad. If `no-input` attribute is specified, it will be the first digit button. Otherwise, the input field will be focused.
valueChanged
_oldValue: string
newValue: string
void