
Security News
Socket Releases Free Certified Patches for Critical vm2 Sandbox Escape
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.
react-textarea-counter
Advanced tools
Basic textarea character counter React component.
npm i react-textarea-counter --save
import React from 'react';
import TextareaCounter from 'react-textarea-counter';
export default function MyComponent() {
return <TextareaCounter countLimit={25} initialValue="Hello World!" />;
}
| Property | Type | Default | Description |
|---|---|---|---|
showCount | bool | true | If you want to show the counter or to hide it. |
countLimit | number | 25 | The max number of characters on the counter. |
countDirection | string | asc | If it should count from the countLimit to zero set to desc otherwise set it to asc. |
countPosition | string | right | Position of the counter on the bottom of the textarea. |
shouldTruncate | string | true | If you want to allow the user to insert more characters than the countLimit set to false. |
initialValue | string | The default initial value on the textarea element. | |
rows | number | 6 | The number of rows of the textarea element. |
resize | string | vertical | Resize attribute of the textarea element. Can be none, both, horizontal or vertical. |
placeholder | string | Placeholder of the textarea element. | |
onChange | func | Callback function on the onChange event. | |
onFocus | func | Callback function on the onFocus event. | |
onBlur | func | Callback function on the onBlur event. | |
required | bool | false | Required attribute of the textarea element. |
disabled | bool | false | Disabled attribute of the textarea element. |
Open source under the terms of the MIT License.
Made by Diogo Capela.
FAQs
Basic textarea character counter React component.
We found that react-textarea-counter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.

Research
Five malicious NuGet packages impersonate Chinese .NET libraries to deploy a stealer targeting browser credentials, crypto wallets, SSH keys, and local files.

Security News
pnpm 11 turns on a 1-day Minimum Release Age and blocks exotic subdeps by default, adding safeguards against fast-moving supply chain attacks.