Search code examples
reactjsresizecontrolstextarearesizable

In the textarea there's a small pin on the bottom right corner that allows users to resize the box, how do i get rid of it with only a react file?


I'm making a form with react, and I need a textarea to 'fill' in with some information from the user. Although since it's limited to 255 characters, I'd like to limit it to not be resizable by the users. How do I do that?


Solution

  • Take a look at the following link: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea

    • In the HTML, you can write something like <textarea maxlength="255"></textarea>
    • You can style the textarea like so: textarea { resize: none; } to prevent the re-sizing of the box.

    You don't need React for this.