Ply mention-input (Pro) wraps a field and opens caret-anchored suggestions after @. Bind ngModel on the mention wrapper, not on the projected input. It is a ControlValueAccessor: the form value is the text, including inserted handles.
Install with npx ply-ui-cli add mention-input.
Unlock it plus 90 pro blocks, widgets & layouts — $99 one-time. Lifetime updates, 14-day money-back guarantee.
Wrap your standard text area or input field with <ply-mention-input> and pass an array of users to the [users] input. Try typing @ below.
<ply-input-group>
<ply-label>Comment</ply-label>
<ply-mention-input [users]="users">
<textarea class="w-full -mb-2 p-4" ply-textarea rows="3" [(ngModel)]="message" placeholder="Type @ to tag a user..."></textarea>
</ply-mention-input>
</ply-input-group>TypeScript
import { Component } from '@angular/core';
// Install: npx ply-ui-cli add mention-input
// Paths are relative to aliases.components (default: src/app/components)
import { MentionInputComponent } from './mention-input/mention-input.component';
@Component({
selector: 'app-mention-input-example',
imports: [
MentionInputComponent
],
template: `...`
})
export class MentionInputExampleComponent {}Install
npx ply-ui-cli add mention-input
Bind [(ngModel)] on ply-mention-input (ControlValueAccessor). Do not also bind the projected field to the same model.
Value: Ship it @
<ply-mention-input [users]="users" [(ngModel)]="comment"> <textarea ply-textarea></textarea> </ply-mention-input>
TypeScript
import { Component } from '@angular/core';
// Install: npx ply-ui-cli add mention-input
// Paths are relative to aliases.components (default: src/app/components)
import { MentionInputComponent } from './mention-input/mention-input.component';
@Component({
selector: 'app-mention-input-example',
imports: [
MentionInputComponent
],
template: `...`
})
export class MentionInputExampleComponent {}Install
npx ply-ui-cli add mention-input
Site-wide VPAT-style notes live on the accessibility report.
Run the following command to add this component to your project:
npx ply-ui-cli add mention-input
For AI agents
Copy a prompt with the registry name, CLI install, and import — or add the Ply MCP server.
npx -y ply-ui-mcp
Ply provides standalone components. Import the exact elements you want to use into your component.
// Install: npx ply-ui-cli add mention-input
// Paths are relative to aliases.components (default: src/app/components)
import { MentionInputComponent } from './mention-input/mention-input.component';
@Component({
selector: 'app-your-component',
imports: [
MentionInputComponent
],
template: `...`
})
export class YourComponent {} API for mention-input — generated from JSDoc in the library source.
| API | Member | Type | Default | Description |
|---|---|---|---|---|
ply-mention-input | users | MentionUser[] | [] | Candidate users for mention suggestions. |
Content