Mention
Text field (input or textarea) with an inline autocomplete popup that opens when a trigger character is typed.
Preview
Attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
placeholder | string | — | Placeholder text for the input or textarea. |
value | string | — | Current text value of the control. |
multiline | boolean | — | Renders a textarea instead of a single-line input. |
trigger | string | @ | Character that activates the mention autocomplete menu. |
Installation
pura is copy-paste and dependency-free. Load the whole library, or just this component.
<link rel="stylesheet" href="/pura/tokens.css">
<script type="module" src="/pura/lib/mention.js"></script> import "./pura/lib/mention.js";