@base-ui-components/react
Version:
Base UI is a library of headless ('unstyled') React components and low-level hooks. You gain complete control over your app's CSS and accessibility features.
16 lines • 502 B
TypeScript
export declare function useField(params: useField.Parameters): void;
export declare namespace useField {
interface Parameters {
enabled?: boolean;
value: unknown;
getValue?: (() => unknown) | undefined;
id: string | undefined;
name?: string | undefined;
commitValidation: (value: unknown) => void;
/**
* A ref to a focusable element that receives focus when the field fails
* validation during form submission.
*/
controlRef: React.RefObject<any>;
}
}