Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rc-textarea

Package Overview
Dependencies
Maintainers
4
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-textarea

Pretty Textarea react component used in used in ant.design

  • 1.8.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.4M
decreased by-2.17%
Maintainers
4
Weekly downloads
 
Created

What is rc-textarea?

The rc-textarea package is a React component for creating and managing text areas with advanced features such as auto-resizing, character counting, and more. It is designed to be highly customizable and easy to integrate into any React application.

What are rc-textarea's main functionalities?

Auto-resizing Textarea

This feature allows the textarea to automatically resize based on the content, with a specified minimum and maximum number of rows.

import React from 'react';
import TextArea from 'rc-textarea';

const AutoResizeExample = () => (
  <TextArea autoSize={{ minRows: 2, maxRows: 6 }} />
);

export default AutoResizeExample;

Character Counting

This feature provides a character count for the textarea, showing the user how many characters they have typed and the maximum allowed.

import React, { useState } from 'react';
import TextArea from 'rc-textarea';

const CharCountExample = () => {
  const [value, setValue] = useState('');
  const maxLength = 100;

  return (
    <div>
      <TextArea
        value={value}
        onChange={(e) => setValue(e.target.value)}
        maxLength={maxLength}
      />
      <div>{value.length}/{maxLength} characters</div>
    </div>
  );
};

export default CharCountExample;

Customizable Styles

This feature allows developers to apply custom styles to the textarea component, making it easy to match the design of their application.

import React from 'react';
import TextArea from 'rc-textarea';

const CustomStyleExample = () => (
  <TextArea style={{ border: '2px solid red', padding: '10px' }} />
);

export default CustomStyleExample;

Other packages similar to rc-textarea

Keywords

FAQs

Package last updated on 20 Sep 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc