API reference: @salmonui/inputs/form
FieldRenderPropsinterface
import type { FieldRenderProps } from '@salmonui/inputs/form';interface FieldRenderProps {
readonly inputProps: {
readonly id: string;
readonly name: string | undefined;
readonly required: boolean | undefined;
readonly disabled: boolean | undefined;
readonly 'aria-describedby': string | undefined;
readonly 'aria-invalid': true | undefined;
readonly 'aria-errormessage': string | undefined;
readonly ref: (el: HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | null) => void;
readonly onBlur: () => void;
};
readonly errors: readonly string[];
readonly invalid: boolean;
readonly validating: boolean;
}
What a custom control receives from Field.
| Name | Signature | Description |
|---|---|---|
inputProps | readonly inputProps: {
readonly id: string;
readonly name: string | undefined;
readonly required: boolean | undefined;
readonly disabled: boolean | undefined;
readonly 'aria-describedby': string | undefined;
readonly 'aria-invalid': true | undefined;
readonly 'aria-errormessage': string | undefined;
readonly ref: (el: HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | null) => void;
readonly onBlur: () => void;
}; | Spread on the native element that carries the value: |
errors | readonly errors: readonly string[]; | |
invalid | readonly invalid: boolean; | |
validating | readonly validating: boolean; |