Input
Campo de texto con etiqueta flotante, icono, sufijo, botón de limpiar y toggle de contraseña. Extiende los atributos de un `<input>`.
import Input from '#LibComponents/astronative/atomic/Input/Input.astro';icon="mail"helperText="Te enviaremos la confirmación"suffix="€" value="250"hasClear={true} value="juan@ct.com"label="Contraseña" hasToggle={true} type="password" value="secreto"hasError={true} customErrorMessage="Email no válido"<AC.Input label="Email" name="email" icon="mail" hasClear />Props del tipo del componente
| Prop | Tipo | Obligatorio | Default | Descripción |
|---|---|---|---|---|
autocomplete | 'on' | 'off' | 'do-not-autofill' | no | — | |
class | string | no | — | |
callbackEvent | string | no | — | |
customErrorMessage | string | no | — | |
hasError | boolean | no | — | |
hasToggle | boolean | no | — | |
hasClear | boolean | no | — | |
helperText | string | no | — | |
icon | string | no | — | |
label | string | no | — | |
suffix | string | no | — |
Ojo
- Los props heredados de `<input>` (type, value, placeholder, required, disabled…) no salen en la tabla: el extractor no resuelve lo que llega por `extends`.
- `suffix` y `hasClear` solo se pintan si el campo tiene `value`; `hasToggle`, solo si `type="password"`.
- El `helperText` desaparece cuando hay error: los dos ocupan el mismo hueco bajo el campo y manda el error.