Appearance
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
| Parameter | Type | Description |
|---|---|---|
props | UiPhoneFieldProps | Configuration 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
});