1
0
mirror of https://github.com/tabler/tabler.git synced 2025-12-21 17:34:25 +04:00
Files
tabler/docs/content/ui/components/autosize.md
2025-04-15 23:18:49 +02:00

1.0 KiB

title, summary, docs-libs, description
title summary docs-libs description
Autosize The autosize element will automatically adjust the textarea height and make it easier for users to follow as they type. autosize Auto-adjusting textarea for better usability.

To be able to use the autosize in your application you will need to install the autosize dependency with npm install autosize.

Default markup

Add the autosize element to your input to make it automatically adjust to the length of a text as a user types it.

To create autosize textarea, add the data-bs-toggle="autosize" attribute to the textarea element:

<textarea class="form-control" data-bs-toggle="autosize" placeholder="Type something…"></textarea>

Look at the example below to see how the autosize element works:

{% capture html -%} Autosize example

{%- endcapture %} {% include "docs/example.html" html=html column vertical %}