co-textarea
This content is not available in your language yet.
Entrada de texto multilínea que replica el estilo de co-input sobre un <textarea> nativo. Úsalo para contenido largo como biografías, descripciones o notas. Admite layout vertical u horizontal, contador con max-length y estados de validación.
Ver código
<co-textarea label="Notas" placeholder="Escribe una nota…" rows="4" helper-text="Añade el contexto relevante" clearable></co-textarea> Props
| Prop | Atributo | Tipo | Default | Descripción |
|---|---|---|---|---|
clearable | clearable | boolean | false | Show clear button when textarea has value |
disabled | disabled | boolean | false | Disabled state |
helperText | helper-text | string | undefined | — | Helper text displayed below the textarea |
label | label | string | undefined | — | Label text displayed above the textarea |
layout | layout | "horizontal" | "vertical" | 'vertical' | Label layout: vertical (label above) or horizontal (label beside) |
maxLength | max-length | number | undefined | — | Maximum character length. When set, a counter is displayed. |
name | name | string | undefined | — | Input name attribute |
placeholder | placeholder | string | '' | Placeholder text |
readonly | readonly | boolean | false | Read-only state |
required | required | boolean | false | Whether the field is required |
resize | resize | "both" | "none" | "vertical" | 'vertical' | Resize behavior of the textarea |
rows | rows | number | 4 | Number of visible text rows |
secondaryLabel | secondary-label | string | undefined | — | Secondary label displayed on the right side |
size | size | "lg" | "md" | "s" | "sm" | 'md' | Field size (mirrors co-input paddings/font: s / sm / md / lg). Vertical extent still comes from `rows`. |
status | status | "default" | "error" | "success" | "warning" | 'default' | Validation status |
value | value | string | '' | Current value |
Eventos
| Evento | Detail | Bubbles | Cancelable | Descripción |
|---|---|---|---|---|
coBlur | void | ✓ | ✓ | Emitted on blur |
coChange | string | ✓ | ✓ | Emitted with the committed text on blur |
coClear | void | ✓ | ✓ | Emitted when clear button is clicked |
coFocus | void | ✓ | ✓ | Emitted on focus |
coInput | string | ✓ | ✓ | Emitted on every keystroke with the current text |
Slots
Este componente no expone slots.
CSS Parts
| Part | Descripción |
|---|---|
::part(counter) | The character counter element |
::part(field) | The bordered textarea wrapper |
::part(helper) | The helper/error text row |
::part(input) | The native textarea element |
::part(label) | The field label |
::part(wrapper) | Root container |
CSS Custom Properties
Este componente no expone CSS custom properties.