@mshafiqyajid/react-textarea
v0.1.0
Published
Auto-resizing textarea with character count and form-control integration.
Maintainers
Readme
@mshafiqyajid/react-textarea
Auto-resizing textarea with character count and form-control integration.
Install
npm install @mshafiqyajid/react-textareaQuick start
import { TextareaStyled } from "@mshafiqyajid/react-textarea/styled";
import "@mshafiqyajid/react-textarea/styles.css";
<TextareaStyled
label="Message"
placeholder="Type something..."
maxLength={500}
showCount
autoResize
/>Headless
import { useTextarea } from "@mshafiqyajid/react-textarea";
const { textareaProps, charCount, isAtLimit } = useTextarea({
maxLength: 200,
});
return (
<div>
<textarea {...textareaProps} />
<span>{charCount} / 200</span>
</div>
);License
MIT
