1.0.5 • Published 2 years ago

react-toxicity-recognizer v1.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

React Toxicity Recognizer

A React toxicity recognition wrapper capable of detecting toxic content from user's input.

Installation

npm install react-toxicity-recognizer

Usage

import ToxicityRecognizer from "react-toxicity-recognizer";

function App() {
    return (
        <ToxicityRecognizer>
	        <input autoFocus type="text"  placeholder="Type here..." />
        </ToxicityRecognizer>
    )
}

API

PropertyDefaultDescription
position"bottom-right"Position of Toast warning. Possible values: "bottom-right", "bottom-left", "top-right", "top-left"
delay500How long to wait before checking the user's input
messageDisplayTime5000How long the warning message will be shown
toxicityThreshold0.8How sensitive the classifier would be
showMessagetrueEnable/Disable the warning message of toxicity
showColorErrortrueEnable/Disable indicator of toxic input
showLoadingIcontrueEnable/Disable loading indicator
customTitlenullChange default title
customMessagenullChange default description
onTextValidate() => {}Returns the raw classification of your input
1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.1

2 years ago

0.0.2

2 years ago