JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 337760
  • Score
    100M100P100Q181227F
  • License MIT

TypeScript definitions for react-input-mask

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@types/react-input-mask) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Installation

    npm install --save @types/react-input-mask

    Summary

    This package contains type definitions for react-input-mask (https://github.com/sanniassin/react-input-mask).

    Details

    Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-input-mask/v1.

    index.d.ts

    import * as React from "react";
    
    declare namespace ReactInputMask {
        interface Props extends React.InputHTMLAttributes<HTMLInputElement> {
            /**
             * Mask string. Format characters are:
             * * `9`: `0-9`
             * * `a`: `A-Z, a-z`
             * * `\*`: `A-Z, a-z, 0-9`
             *
             * Any character can be escaped with backslash, which usually will appear as double backslash in JS strings.
             * For example, German phone mask with unremoveable prefix +49 will look like `mask="+4\\9 99 999 99"` or `mask={"+4\\\\9 99 999 99"}`
             */
            mask: string;
            /**
             * Character to cover unfilled editable parts of mask. Default character is "_". If set to null, unfilled parts will be empty, like in ordinary input.
             */
            maskChar?: string | null | undefined;
            /**
             * Defines format characters with characters as keys and corresponding RegExp string as values. Default ones:
             * ```
             * {
             *   "9": "[0-9]",
             *   "a": "[A-Za-z]",
             *   "*": "[A-Za-z0-9]"
             * }```
             */
            formatChars?: { [key: string]: string } | undefined;
            /**
             * Show mask even in empty input without focus.
             */
            alwaysShowMask?: boolean | undefined;
            /**
             * Use inputRef instead of ref if you need input node to manage focus, selection, etc.
             */
            inputRef?: React.Ref<HTMLInputElement> | undefined;
        }
    }
    
    declare class ReactInputMask extends React.Component<ReactInputMask.Props> {
    }
    
    export default ReactInputMask;
    

    Additional Details

    • Last updated: Tue, 07 Nov 2023 20:08:00 GMT
    • Dependencies: @types/react

    Credits

    These definitions were written by Alexandre Paré.