View as Markdown

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

Interfaces

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.