Basic usage
import { MentionInput, type MentionData } from "mentis";
import "mentis/dist/index.css";
function App() {
const [dataValue, setDataValue] = useState<string>("");
const handleChange = (newValue: MentionData) => {
setDataValue(newValue.dataValue);
};
return (
<MentionInput
options={[
{ label: "Alice", value: "alice" },
{ label: "Bob", value: "bob" },
{ label: "Charlie", value: "charlie" },
]}
dataValue={dataValue}
onChange={handleChange}
/>
);
}