Go Main page
Go Main page

Web components

cover

components

Input Phone

v.1.0.0 | Saturn

Usage

import { InputPhone } from '@kubit-ui-web/react-components'
12345678
<InputPhone
  variant="DEFAULT"
  prefix={{ content: '+34' }}
  flag={{ icon: 'ICON_MOBILE' }}
  label={{ content: 'Label' }}
  placeholder="Placeholder"
  helpMessage={{ content: 'Help message' }}
/>

Props

The InputPhone component inherits its properties of the Input component. For more information visit the Input documentation.

Let's delve into the versatility of the inputPhone component by examining its avalaible props.

PropertyTypeDefaultDescription
variant
Required
String-Variant of InputPhone
prefixInputPhonePrefixType-Country prefix number to show into prefix container
prefixNodeReactNode-Node to show into prefix container. If this prop is passed, the prefix prop will be ignored
flagInputPhoneFlagType-Country flag to show into prefix container
inputVariantString-Set the Input's variant
errorBoolean-Specifies if the input element has error or not
disabledBoolean-Specifies if the input element is disabled or not
errorExecutionERROR_EXECUTION-When error handling
keyValidationString-Key validation
internalErrorExecutionINTERNAL_ERROR_EXECUTIONonChangeOnBlurWhen error handling
onInternalErrors
(errors: string) => void
-Function that is called when an internal error occurs
onError(error: boolean) => void-Function that is called when an error occurs
ctvInputPhoneStylesProps-Modify styles for the default version of the component

Initialized extended props

PropertyTypeDefaultDescription
maskTypeMASK_TYPENUMBERSMask type applied
truncateBooleanfalseIndicates if text value is truncated when is too big
typeInputTypeTypeTELThe type attribute specifies the type of input element to display. If the type attribute is not specified, the default type is text"