textarea-with-chipst

1.1.1 • Public • Published

add style and own node into textarea

install Library

npm i textarea-with-pattern

import

import { AddPattern, TextAreaPattern } from 'textarea-with-chipst';

use Library

import { AddPattern, TextAreaPattern } from "textarea-with-chipst";
import { useState } from "react";

export default function App() {
  const [value, setValue] = useState<string>("")
  console.log("textarea value :", value)

  return (
    <div>
      <AddPattern
        seperator={"sec"}
        pattern={"first"}
        tagClass={"tagClass"}
        setValue={setValue}
        node={<button> Add Pattern</button>}
      />
      <TextAreaPattern
        setValue={setValue}
        node={<pre></pre>}
      />
    </div>
  );
}

description

seperator :

Separator to separate pattern from text

pattern :

the relevant variable

setValue :

The state related to updating the value inside the textarea

node :

html tag for textarea and button (you can use your own styles there)

tagClass :

class of pattern section inside of textarea

Package Sidebar

Install

npm i textarea-with-chipst

Weekly Downloads

0

Version

1.1.1

License

ISC

Unpacked Size

4.78 kB

Total Files

5

Last publish

Collaborators

  • peymanhc