Mention

Type a trigger character in a text field to pick a person, a tag or a command from a list.

General

Type @ and the start of a name. Arrow keys move through the list, Enter or Tab inserts the mention and Escape closes the list.

Other trigger

Change the character with trigger. Here # picks a topic.

Comment box

Keep the text in your state to read who was mentioned. The people below are the ones who will be notified.

APIs

Mention.Props

AttributeDescriptionTypeAccepted valuesDefault
optionswhat can be mentioned. value is inserted, label is shown{ value: string; label?: string; disabled?: boolean }[]--
triggercharacter that opens the liststring-@
valuetext of the field, to control itstring--
initialValuetext at the startstring-''
onChangecalled with the new text(text: string) => void--
onSelectcalled with the option that was inserted(option: MentionOption) => void--
rowsheight of the fieldnumber-3
placeholderhint while the field is emptystring--
emptyTextshown when nothing matchesstring-No results
disabledblock the fieldboolean-false
...native props of the textareaTextareaHTMLAttributes--
Edit this page on GitHub