Components · Forms · Mention
Back to Mention typesMention
Use for a comment or message field where someone can tag another person inline, like "Hey @Jordan, can you review this?", without replacing the rest of the free-form text.
Properties
Size, corner radius, label and placeholder are properties of the same component, not separate fields - change them below to check this field's style and states in the Live Preview.
Live Preview
Both types compared side by side, each in all 9 states. One full matrix is rendered per selected combination of Size and Corner radius - check more than one option in a dropdown to see every combination side by side.
When to use
Any free-form text field where someone needs to tag or notify another person inline, mixed in with the rest of the message.
Validation
Mention adds async suggestion states on top of whatever validation the underlying text field needs - what shows while matches are being fetched, what shows when there are none, and whether an unresolved "@" fragment is allowed to stand.
- Required marking - mark a required Mention field the same way as any other required field in this system (red asterisk after the label). When the form requires at least one valid mention specifically, say so in the field's helper text - "required" alone doesn't tell the user a mention is what's missing.
- Loading state - while the suggestion popover is fetching matches for whatever follows "@", show a lightweight loading indicator inside it rather than leaving it empty. An empty flash between keystroke and results reads as lag or a broken query, not as "still searching."
- No-results state - if nothing matches, show a specific, calm "No matches for '[query]'" message inside the popover instead of closing it silently. Closing without a message reads as a bug, not a deliberate empty state.
- Unresolved mentions - when the field requires every mention to resolve to a real, selected entity rather than arbitrary trailing text, validate that on blur or submit with a message like "Remove or fix the unresolved mention '@[text]'," naming the exact fragment that didn't resolve.
Component Guide
Overview
Mention is a free-form text field that lets someone tag another person inline by typing "@" followed by a name, inserting a distinct chip in the middle of otherwise normal text - used for comments, chat, and any message field where notifying a specific person matters.
When to Use
- Comments and team chat - tagging a teammate inline within a message.
- Task assignment through free text - "assign to @Jordan" inside a longer note.
- Code review and support ticket threads - notifying a specific reviewer or agent.
When Not to Use
- A field whose sole purpose is picking one person from a list - use Select or Autocomplete instead of a full free-text field with an embedded picker.
- Plain free-form text with no need to tag anyone - use Input or Text Area - the "@" trigger adds complexity that's wasted if never used.
- Tagging concepts, labels, or categories rather than people - use Tag or a multi-select Select instead of overloading the mention pattern.
Best Practices
- Trigger the suggestion panel immediately on "@" and filter it live as the user keeps typing a name.
- Render an inserted mention as a visually distinct chip, not plain text, so it's unambiguous who was tagged.
- Let the user keep typing free-form text before and after a mention - it should never take over the whole field.
Do and Don't
Do
Full name alongside the handle, so the right person is picked when two accounts start the same way.
Don't
Handles alone give the user no way to tell the two apart, so the notification goes to the wrong person.
Accessibility
- The suggestion panel is reachable by keyboard (arrow keys to move, Enter to insert, Escape to dismiss) without ever requiring a mouse.
- An inserted mention chip is announced as a distinct, named entity by screen readers, not read as raw "@username" text.
- The field's placeholder or label makes the "@" trigger discoverable for first-time users.
Related Components
Autocomplete, Text Area, Input, Tag.
{
"component": "Mention",
"category": "Forms",
"summary": "Mention is a free-form text field that lets someone tag another person inline by typing \"@\" followed by a name, inserting a distinct chip in the middle of otherwise normal text - used for comments, chat, and any message field where notifying a specific person matters.",
"whenToUse": [
"Comments and team chat - tagging a teammate inline within a message.",
"Task assignment through free text - \"assign to @Jordan\" inside a longer note.",
"Code review and support ticket threads - notifying a specific reviewer or agent."
],
"whenNotToUse": [
"A field whose sole purpose is picking one person from a list - use Select or Autocomplete instead of a full free-text field with an embedded picker.",
"Plain free-form text with no need to tag anyone - use Input or Text Area - the \"@\" trigger adds complexity that's wasted if never used.",
"Tagging concepts, labels, or categories rather than people - use Tag or a multi-select Select instead of overloading the mention pattern."
],
"bestPractices": [
"Trigger the suggestion panel immediately on \"@\" and filter it live as the user keeps typing a name.",
"Render an inserted mention as a visually distinct chip, not plain text, so it's unambiguous who was tagged.",
"Let the user keep typing free-form text before and after a mention - it should never take over the whole field."
],
"doAndDont": {
"do": "Full name alongside the handle, so the right person is picked when two accounts start the same way.",
"dont": "Handles alone give the user no way to tell the two apart, so the notification goes to the wrong person."
},
"accessibility": [
"The suggestion panel is reachable by keyboard (arrow keys to move, Enter to insert, Escape to dismiss) without ever requiring a mouse.",
"An inserted mention chip is announced as a distinct, named entity by screen readers, not read as raw \"@username\" text.",
"The field's placeholder or label makes the \"@\" trigger discoverable for first-time users."
],
"relatedComponents": [
"Autocomplete",
"Text Area",
"Input",
"Tag"
]
}