autosize.mdx 647 B

12345678910111213141516
  1. ---
  2. title: Autosize
  3. description: The autosize element will automatically adjust the textarea height and make it easier for users to follow as they type.
  4. libs: autosize
  5. ---
  6. To be able to use the autosize in your application you will need to install the autosize dependency with `npm install autosize`.
  7. ## Default markup
  8. Add the autosize element to your input to make it automatically adjust to the length of a text as a user types it.
  9. ```html code example centered columns={1} scrollable
  10. <label class="form-label">Autosize example</label>
  11. <textarea class="form-control" data-bs-toggle="autosize" placeholder="Type something…"></textarea>
  12. ```