Ir al contenido

co-phone-field

Entrada de teléfono que compone un selector de país (bandera y código de marcación) con un campo libre para el número. El valor se almacena como una cadena "{dialCode}{número}". Usa default-country para preseleccionar el país por su código ISO2.

Ver código
<co-phone-field label="Teléfono" placeholder="300 123 4567" default-country="CO"></co-phone-field>

Props

PropAtributoTipoDefaultDescripción
defaultCountrydefault-countrystring''Default country ISO2 code (e.g. "CO", "US"). Optional — if not set, starts empty.
disableddisabledbooleanfalseDisable the entire field.
helperTexthelper-textstring | undefinedHelper/error text below the field.
labellabelstring | undefinedField label.
layoutlayout"horizontal" | "vertical"'vertical'Label layout: vertical (label above) or horizontal (label beside)
placeholderplaceholderstring''Placeholder for the number input.
requiredrequiredbooleanfalseRequired indicator.
sizesize"lg" | "md" | "s" | "sm"'md'Field size (mirrors co-input): s 28 / sm 32 / md 40 / lg 48.
statusstatus"default" | "error" | "info" | "success" | "warning"'default'Validation status.
valuevaluestring''Current full value (dialCode + number).

Eventos

EventoDetailBubblesCancelableDescripción
coChangestringEmits the full phone string on change.

Slots

Este componente no expone slots.

CSS Parts

Este componente no expone CSS parts.

CSS Custom Properties

Este componente no expone CSS custom properties.