Mentions
A textarea with @-mention autocomplete for tagging users or references.
When to Use
- For comment or messaging inputs with user tagging
- When users need to reference others with @ syntax
- For any input that needs trigger-based suggestions
Import
Examples
Basic
API
MentionsProps
options—{ value: string; label?: ReactNode }[]— Mention suggestionsvalue—string— Input value (controlled)defaultValue—string— Default valueonChange—(text: string) => void— Text change handleronSearch—(text: string, prefix: string) => void— Search handleronSelect—(option, prefix: string) => void— Selection handlerprefix—string | string[]— Trigger character(s) (default:"@")placement—"top" | "bottom"— Suggestion position (default:"bottom")autoSize—boolean | { minRows, maxRows }— Auto-resizeallowClear—boolean— Show clear buttondisabled—boolean— Disable inputstatus—"error" | "warning"— Validation status