react-auto-indexed

1.0.3 • Public • Published

React Auto Indexed

Enhance textareas with automatic line numbering and array value handling for better organization and reference.

Installation

You can install the package via npm or yarn:

npm install react-auto-indexed
    or
yarn add react-auto-indexed

Usage

import React from 'react';
import { ReactAutoIndex } from 'react-auto-indexed';

const App = () => {
  const handleChange = (value) => {
    console.log('Textarea value changed:', value);
  };

  return (
    <div>
      <h1>React Auto Indexed Demo</h1>
      <ReactAutoIndex
        value={['Item 1', 'Item 2', 'Item 3']}
        placeholder="Type here..."
        onChange={handleChange}
      />
    </div>
  );
};

export default App;

props

Value

  • type: array

placeholder

  • type: string

onChange

  • type: function

className

  • type: string

Package Sidebar

Install

npm i react-auto-indexed

Weekly Downloads

4

Version

1.0.3

License

MIT

Unpacked Size

13.5 kB

Total Files

8

Last publish

Collaborators

  • davidwale