• Version 4.3.5
  • Published
  • 4.85 kB
  • 1 dependency
  • MIT license


npm i @types/react-textarea-autosize
yarn add @types/react-textarea-autosize
pnpm add @types/react-textarea-autosize


TypeScript definitions for react-textarea-autosize



namespace react-textarea-autosize

module 'react-textarea-autosize' {}

    class TextareaAutosize

    class TextareaAutosize extends React.Component<TextareaAutosizeProps> {}

    interface TextareaAutosizeProps

    interface TextareaAutosizeProps extends React.HTMLProps<HTMLTextAreaElement> {}
    • properties

    property inputRef

    | ((node: HTMLTextAreaElement) => void)
    | React.RefObject<HTMLTextAreaElement>;
    • Allows an owner to retrieve the DOM node.

    property maxRows

    maxRows?: number;
    • Maximum number of rows to show.

    property minRows

    minRows?: number;
    • Alias for rows.

    property onChange

    onChange?: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;
    • Callback on value change

      Parameter event

    property onHeightChange

    onHeightChange?: (height: number) => void;
    • Callback on height change

      Parameter height

    property rows

    rows?: number;
    • Minimal number of rows to show.

    property useCacheForDOMMeasurements

    useCacheForDOMMeasurements?: boolean;
    • Try to cache DOM measurements performed by component so that we don't touch DOM when it's not needed.

      This optimization doesn't work if we dynamically style <textarea /> component. false

    property value

    value?: string;
    • Current textarea value

    Package Files (1)

    Dependencies (1)

    Dev Dependencies (0)

    No dev dependencies.

    Peer Dependencies (0)

    No peer dependencies.


    To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

    You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/react-textarea-autosize.

    • Markdown
    • HTML
      <a href="https://www.jsdocs.io/package/@types/react-textarea-autosize"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>