Estructura y utilidades
Secciones, wizards, listas repetibles, botones, alertas y skeletons.
Todos los campos comparten el contrato base (control, name, label, description, placeholder, disabled, required, tooltip, className). Aquí se listan solo las props adicionales de cada campo.
FormSection
Sección con título, descripción y colapso opcional.
| Prop | Tipo | Requerida |
|---|---|---|
title | string | — |
children | ReactNode | sí |
showSeparator | boolean | — |
FormFieldRow
Fila que alinea varios campos en columnas.
| Prop | Tipo | Requerida |
|---|---|---|
title | string | — |
children | ReactNode | sí |
showSeparator | boolean | — |
FormDivider
Separador visual entre bloques.
| Prop | Tipo | Requerida |
|---|---|---|
title | string | — |
children | ReactNode | sí |
showSeparator | boolean | — |
FormContainer
Contenedor con el ancho y espaciado estándar de formularios.
| Prop | Tipo | Requerida |
|---|---|---|
title | string | — |
children | ReactNode | sí |
showSeparator | boolean | — |
FormStepIndicator
Indicador de pasos para wizards con estados completado/actual/pendiente.
| Prop | Tipo | Requerida |
|---|---|---|
steps | FormStep[] | sí |
currentStep | number | sí |
completedSteps | number[] | — |
orientation | 'horizontal' | 'vertical' | — |
variant | 'default' | 'compact' | 'numbered' | — |
showLabels | boolean | — |
showDescriptions | boolean | — |
isLoading | boolean | — |
onStepClick | ((stepIndex: number) => void) | — |
allowNavigation | boolean | — |
FormArrayField
Lista repetible de sub-campos (useFieldArray) con agregar/quitar/reordenar.
| Prop | Tipo | Requerida |
|---|---|---|
minItems | number | — |
maxItems | number | — |
defaultValue | FieldArray<TFieldValues, TName> | — |
showReorder | boolean | — |
showIndex | boolean | — |
addButtonLabel | string | — |
emptyMessage | string | — |
renderItem | (props: { | sí |
FormDynamicFieldGroup
Grupo repetible de campos heterogéneos definidos por descriptor.
| Prop | Tipo | Requerida |
|---|---|---|
minItems | number | — |
maxItems | number | — |
defaultValue | Record<string, unknown> | — |
renderField | ( | sí |
labels | { | — |
showDragHandle | boolean | — |
showMoveButtons | boolean | — |
addButtonPosition | 'top' | 'bottom' | 'both' | — |
variant | 'default' | 'card' | 'compact' | — |
itemClassName | string | — |
FormValidationSummary
Resumen clicable de todos los errores del formulario.
| Prop | Tipo | Requerida |
|---|---|---|
errors | FieldErrors<TFieldValues> | sí |
fieldLabels | Record<string, string> | — |
maxErrors | number | — |
variant | 'default' | 'compact' | 'inline' | — |
showIcon | boolean | — |
collapsible | boolean | — |
defaultOpen | boolean | — |
onErrorClick | ((fieldName: string) => void) | — |
onDismiss | (() => void) | — |
labels | Partial<typeof DEFAULT_VALIDATION_LABELS> | — |
FormSkeleton
Skeleton de formulario completo para estados de carga.
| Prop | Tipo | Requerida |
|---|---|---|
showLabel | boolean | — |
showDescription | boolean | — |
inputHeight | 'sm' | 'md' | 'lg' | 'textarea' | — |
FormSkeletonSection
Skeleton de una sección.
| Prop | Tipo | Requerida |
|---|---|---|
showLabel | boolean | — |
showDescription | boolean | — |
inputHeight | 'sm' | 'md' | 'lg' | 'textarea' | — |
FormSkeletonField
Skeleton de un campo suelto.
| Prop | Tipo | Requerida |
|---|---|---|
showLabel | boolean | — |
showDescription | boolean | — |
inputHeight | 'sm' | 'md' | 'lg' | 'textarea' | — |
FormSubmitButton
Botón de envío con estado pendiente integrado.
| Prop | Tipo | Requerida |
|---|---|---|
isPending | boolean | — |
text | string | sí |
loadingText | string | — |
icon | ReactNode | — |
loadingIcon | ReactNode | — |
fullWidth | boolean | — |
FormCancelButton
Botón de cancelar consistente.
| Prop | Tipo | Requerida |
|---|---|---|
isPending | boolean | — |
text | string | sí |
loadingText | string | — |
icon | ReactNode | — |
loadingIcon | ReactNode | — |
fullWidth | boolean | — |
FormButtonGroup
Fila estándar de acciones del formulario.
| Prop | Tipo | Requerida |
|---|---|---|
isPending | boolean | — |
text | string | sí |
loadingText | string | — |
icon | ReactNode | — |
loadingIcon | ReactNode | — |
fullWidth | boolean | — |
FormActions
Barra cancelar/enviar preconfigurada con spinner.
| Prop | Tipo | Requerida |
|---|---|---|
cancelHref | string | sí |
cancelLabel | string | — |
submitLabel | string | sí |
loadingLabel | string | sí |
isPending | boolean | sí |
FormAlert
Alerta del formulario (error/éxito/aviso/info).
| Prop | Tipo | Requerida |
|---|---|---|
variant | AlertVariant | — |
message | string | null | — |
title | string | — |
children | ReactNode | — |
showIcon | boolean | — |
dismissible | boolean | — |
onDismiss | (() => void) | — |
FormErrorAlert
Atajo de alerta de error.
| Prop | Tipo | Requerida |
|---|---|---|
variant | AlertVariant | — |
message | string | null | — |
title | string | — |
children | ReactNode | — |
showIcon | boolean | — |
dismissible | boolean | — |
onDismiss | (() => void) | — |
FormSuccessAlert
Atajo de alerta de éxito.
| Prop | Tipo | Requerida |
|---|---|---|
variant | AlertVariant | — |
message | string | null | — |
title | string | — |
children | ReactNode | — |
showIcon | boolean | — |
dismissible | boolean | — |
onDismiss | (() => void) | — |
FormInfoBox
Caja informativa.
| Prop | Tipo | Requerida |
|---|---|---|
variant | AlertVariant | — |
message | string | null | — |
title | string | — |
children | ReactNode | — |
showIcon | boolean | — |
dismissible | boolean | — |
onDismiss | (() => void) | — |
FormErrorBanner
Banner de error de nivel formulario (server actions).
FormSuccessScreen
Pantalla de éxito post-envío con enlace de retorno.
| Prop | Tipo | Requerida |
|---|---|---|
message | string | sí |
backHref | string | sí |
backLabel | string | sí |
FormFieldTooltip
Tooltip de ayuda junto a un campo.
Solo usa las props base.
FormLabelWithTooltip
Label con tooltip integrado.
Solo usa las props base.
I18nTabs
Pestañas por idioma para editar el mismo campo en varios locales.
| Prop | Tipo | Requerida |
|---|---|---|
children | (lang: Locale) => ReactNode | sí |