• Version 4.3.6
  • Published
  • 7.25 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>
    | undefined;
    • Allows an owner to retrieve the DOM node.

    property maxRows

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

    property minRows

    minRows?: number | undefined;
    • Alias for rows.

    property onChange

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

      Parameter event

    property onHeightChange

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

      Parameter height

    property rows

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

    property useCacheForDOMMeasurements

    useCacheForDOMMeasurements?: boolean | undefined;
    • 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 | undefined;
    • 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>