New props suggestions "counter" and "limit" and "showRemaining" for the Textarea component
Open
Status: Won't fix
Type: Question
- Dominant language
- TypeScript
- Stars
- 165
- Forks
- 31
- PR merge metrics
- No merged PRs in 30d
Description
Hi
What do you think about support for 3 additional, value + event related props?
`counter` prop is for adding a counter at the bottom right corner of the textarea to show, how many characters was entered.
`limit` prop is for limiting option to have a character limit on the component. This is kind a useful when input needs to be limited to a pre-defined number.
`showRemaining` prop, can be a side prop for `limit` in order to show how many characters remain. Something like, `28/100` to show 28 characters of 100 left.
Type definition:
```ts
| {
limit?: null;
}
| {
limit: number;
showRemaining: boolean;
}
```
Contributor guide
Assessment
This issue has not been assessed yet.