Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Feb 20, 2024
1 parent 65e1c24 commit 06f9550
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions packages/core/useTextareaAutosize/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,6 @@ category: Browser

Automatically update the height of a textarea depending on the content.

::: info
It's recommended to reset the scrollbar styles for the textarea element to avoid incorrect height values for large amounts of text.

```css
textarea {
-ms-overflow-style: none;
scrollbar-width: none;
}

textarea::-webkit-scrollbar {
display: none;
}
```
:::

## Usage

### Simple example
Expand All @@ -40,6 +25,23 @@ const { textarea, input } = useTextareaAutosize()
</template>
```

::: info

It's recommended to reset the scrollbar styles for the textarea element to avoid incorrect height values for large amounts of text.

```css
textarea {
-ms-overflow-style: none;
scrollbar-width: none;
}

textarea::-webkit-scrollbar {
display: none;
}
```

:::

### With `rows` attribute

If you need support for the rows attribute on a textarea element, then you should set the `styleProp` option to `minHeight`.
Expand Down

0 comments on commit 06f9550

Please sign in to comment.