Vivid API

Dial Pad

Dial Pad allows users to enter or dial phone numbers.

Default Configuration

International Numbers

To support international numbers, you can use the pattern like ^\+?[0-9#*]*$ which allows an optional + at the beginning. Users can long press the 0 button or long press the Space key on the keyboard (when the input field is active) to insert a + symbol (commonly used for international numbers).

Labelling

Helper Text

The helper-text attribute allows you give extra context to the number that is being displayed. The helper text is displayed under the phone number input element.

Call Button Label

Use the call-button-label attribute to change the call button label.

End Call Button Label

Use the end-call-button-label attribute to change the end call button label.

Placeholder

To give a hint to the user of what to enter in the input, use the placeholder attribute to set the text displayed in the input.

Call Active

The call-active attribute enables the “end call button” and hides the “dial button”.

Pending

The pending attribute disables the call button and displays a processing indicator.

Disabled

The disabled attribute controls the disabled state of the keypad, input and Call/End call buttons.

Size

When vertical space is limited, set the size attribute to condensed.

This reduces the overall height of the Dial Pad by decreasing spacing between controls, making it more suitable for compact layouts without changing functionality.

Removing Elements

No Call

The no-call attribute removes call/end call functionality and hides the call/end call button.

No Input

The no-input attribute removes the input field.