Dynamic text input height for chat

Can we get the height of a text input to adjust dynamically? This would be very helpful when using a text input for a chat function.
Right now you can only manually resize the input so that several lines of text could be visible at once.

Actually, this should be a core option for the text input component, please make it available asap.