Textarea
Área de texto multilínea. Comparte variantes (outline, filled, flushed) y tamaños con Input. Ofrece contador de caracteres opcional (showCount + maxLength), control de redimensionado (resize) y número de filas (rows).
Instalación#
bash
pnpm add @tsukira/uiUso#
tsx
import { Textarea } from "@tsukira/ui"; <Textarea label="Descripción" rows={4} placeholder="Escribe aquí…" /><Textarea label="Bio" maxLength={160} showCount helperText="Máximo 160 caracteres."/>Ejemplos#
Playground
cambia las props y el código se regeneralabel
helperText
errorText
size
variant
isInvalid
Inactivo
fullWidth
Inactivo
resize
rows
showCount
Activo
Variantes
outline · filled · flushedContador de caracteres
showCount + maxLengthEstados
helperText · isInvalid + errorText · disabledFusión: formulario de feedback
FormField + Textarea + ButtonTu opinión es anónima y nos ayuda a priorizar.
Fusión: caja de comentario con avatar
Avatar + Textarea + ButtonLG
API#
TextareaPropsextends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'>| Prop | Tipo | Default | Descripción |
|---|---|---|---|
label | string | — | — |
helperText | string | — | — |
errorText | string | — | — |
size | 'sm' | 'md' | 'lg' | — | — |
variant | 'outline' | 'filled' | 'flushed' | — | — |
isInvalid | boolean | — | — |
fullWidth | boolean | — | — |
resize | 'none' | 'vertical' | 'horizontal' | 'both' | — | Resize: 'none' | 'vertical' (default) | 'horizontal' | 'both'. |
rows | number | 4 | Filas (atributo nativo rows). Default 4. |
showCount | boolean | — | Mostrar contador de caracteres (requiere maxLength). |