co-phone-field
This content is not available in your language yet.
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
| Prop | Atributo | Tipo | Default | Descripción |
|---|---|---|---|---|
defaultCountry | default-country | string | '' | Default country ISO2 code (e.g. "CO", "US"). Optional — if not set, starts empty. |
disabled | disabled | boolean | false | Disable the entire field. |
helperText | helper-text | string | undefined | — | Helper/error text below the field. |
label | label | string | undefined | — | Field label. |
layout | layout | "horizontal" | "vertical" | 'vertical' | Label layout: vertical (label above) or horizontal (label beside) |
placeholder | placeholder | string | '' | Placeholder for the number input. |
required | required | boolean | false | Required indicator. |
size | size | "lg" | "md" | "s" | "sm" | 'md' | Field size (mirrors co-input): s 28 / sm 32 / md 40 / lg 48. |
status | status | "default" | "error" | "info" | "success" | "warning" | 'default' | Validation status. |
value | value | string | '' | Current full value (dialCode + number). |
Eventos
| Evento | Detail | Bubbles | Cancelable | Descripción |
|---|---|---|---|---|
coChange | string | ✓ | ✓ | Emits 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.