antd
Version:
An enterprise-class UI design language and React components implementation
27 lines (26 loc) • 1.11 kB
TypeScript
import React from 'react';
import type { InputRef, InputProps as RcInputProps } from 'rc-input';
import type { InputStatus } from '../_util/statusUtils';
import type { SizeType } from '../config-provider/SizeContext';
import type { Variant } from '../form/hooks/useVariants';
export interface InputFocusOptions extends FocusOptions {
cursor?: 'start' | 'end' | 'all';
}
export type { InputRef };
export declare function triggerFocus(element?: HTMLInputElement | HTMLTextAreaElement, option?: InputFocusOptions): void;
export interface InputProps extends Omit<RcInputProps, 'wrapperClassName' | 'groupClassName' | 'inputClassName' | 'affixWrapperClassName' | 'classes'> {
rootClassName?: string;
size?: SizeType;
disabled?: boolean;
status?: InputStatus;
/** @deprecated Use `variant="borderless"` instead. */
bordered?: boolean;
/**
* @since 5.13.0
* @default "outlined"
*/
variant?: Variant;
[key: `data-${string}`]: string | undefined;
}
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<InputRef>>;
export default Input;