I'm attempting to create an input component that wraps the text and increases in height with each new line, similar to how it works on desktop Facebook. When you select someone, open the message box, and start typing, the input grows larger with each additional line of text.
Currently, I am using a textarea for this purpose:
<Input />
const Input = styled.textarea`
border: 0;
outline: none;
padding: 5px 10px;
border-radius: 20px;
font-size: 14px;
width: 100%;
overflow-wrap: break-word;
height: 24px;
`;
Once I have entered 5 lines of text, I want a scroll bar to appear. How can I achieve this?