UNPKG

react-text-mask-modern

Version:

A modern, React 19+ compatible input masking component using hooks and TypeScript.

17 lines (14 loc) 628 B
import React, { InputHTMLAttributes, FocusEvent, ChangeEvent } from 'react'; interface MaskedInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange' | 'onBlur'> { mask: any; guide?: boolean; value?: string | number; pipe?: any; placeholderChar?: string; keepCharPositions?: boolean; showMask?: boolean; onBlur?: (event: FocusEvent<HTMLInputElement>) => void; onChange?: (event: ChangeEvent<HTMLInputElement>) => void; } declare const MaskedInput: React.ForwardRefExoticComponent<MaskedInputProps & React.RefAttributes<HTMLInputElement>>; export { MaskedInput };