Mention
A component used to trigger a mention (@) candidate list during text input, supporting custom trigger characters, matching modes, and rendering templates.
Component Features
- 🛠️ Multiple Match Modes: Supports prefix matching (prefix), exact matching (exact), and fuzzy matching (fuzzy).
- ⌨️ Multiple Trigger Characters: Allows custom single or multiple trigger characters (like
@,#). - 🖱️ High Adaptability: Compatible with standard inputs, textareas, and content-editable elements (like rich text editors).
- 🎨 Custom Rendering: Supports customizing the display of mention candidate list items via slots.
Basic Usage
The most basic mention display, using prefix matching mode.
Fuzzy Matching & Textarea
Using fuzzy matching in a textarea with a set maximum height.
Custom Triggers & List Items
Supports multiple trigger characters (such as @, #) and custom list item content display.
ContentEditable Integration
Using the mention component inside a contenteditable element, which is very common in rich text scenarios.
Theme Customization
Combined with BrConfigProvider, you can globally override the default styles of the component, such as modifying theme colors and border radius, and deeply customize the highlight style of the selected item using the highlightClass property.