API reference
@salmonui/inputs/form
19 exported symbols: 4 components, 1 function, 8 interfaces and 6 types. Each name links its page with the signature, docs and members.
import { … } from '@salmonui/inputs/form';Components
FieldLabel, description, error and validation around a custom control. Every Salmon field renders the same parts itself.FieldDescriptionThe description part for custom layouts.FieldErrorThe error part for custom layouts: renders the enclosing field's error (or children) with the id its control points at.FormA native <form> that validates its Salmon fields on submit. Native submission, FormData, useFormStatus and React 19 actions work unchanged. ref is the <form>.
Functions
useFieldContextThe state of the enclosing Field, or null outside one.
Interfaces
FieldCommonPropsProps every Salmon field shares.FieldPropsFieldRenderPropsWhat a custom control receives from Field.FieldStateFieldValidatorContextContext of a form field's custom validators (@salmonui/inputs/form Field). It is passed as both the row and the ctx argument, so validate(value, { formData })…FormPropsFormValidateEventonBeforeValidate event: preventDefault() skips client validation for this submit.FormValidationResultonValidate result: errors keyed by field name.
Types
FieldSizeField size (a fixed metric set, not density).FieldValidationRules of a form field: the column vocabulary with the field context.FieldValidationTextValidation strings, flat keys shared with the Data Grid localeText (validationRequired, validationMin, ...; {0} / {1} are the rule arguments).ValidateOnWhen errors become visible.ValidationBehavior'native' blocks an invalid submit; 'aria' marks fields and lets it proceed.ValidationErrorsServer errors keyed by field name.