@mitcsutt/kiln-forms
Version:
Kiln forms: typed React forms on TanStack Form, in component or JSON schema mode, rendered through kiln-ui
30 lines (29 loc) • 1.05 kB
TypeScript
import { type TextFieldProps as UiTextFieldProps } from '@mitcsutt/kiln-ui';
import type { ControlledKeys } from '../internal/controlledKeys.js';
import { type CommonFieldProps } from '../../../hooks/useFieldBinding.js';
export interface FormTextFieldProps extends Omit<UiTextFieldProps, ControlledKeys | 'type'>, CommonFieldProps<string> {
/** Input mode/autocomplete hint only; validation comes from the schema/rules. Default `text`. */
type?: 'text' | 'email' | 'tel' | 'url' | 'search';
}
/**
* A single-line text field bound to a `string` path.
*
* @remarks
* It renders kiln-ui's {@link TextField | TextField}.
*
* @example In a schema
* ```json
* {
* "kind": "text",
* "name": "destination",
* "label": "Destination"
* }
* ```
*
* @value `string`
* @empty `''`
*
* @privateRemarks
* A single-line text field bound to a `string` path (§7.2 `text`).
*/
export declare const FormTextField: import("../../../kit/contracts.js").FieldDef<import("../../../kit/contracts.js").ExactContract<string>, FormTextFieldProps>;