add style and own node into textarea
npm i textarea-with-pattern
import { AddPattern, TextAreaPattern } from 'textarea-with-chipst';
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>
);
}
Separator to separate pattern from text
the relevant variable
The state related to updating the value inside the textarea
html tag for textarea and button (you can use your own styles there)
class of pattern section inside of textarea