@skyastrall/mentions-vue
v0.4.0
Published
Vue 3 composable and compound components for @mentions, #tags, /commands. Powered by @skyastrall/mentions-core.
Downloads
388
Maintainers
Readme
@skyastrall/mentions-vue
Multi-trigger inline suggestions for Vue 3. Drop-in component, compound components, or composable.
Docs · Playground · GitHub
Install
npm install @skyastrall/mentions-vueRequires vue >= 3.4.
Quick Start
<script setup>
import { ref } from "vue";
import { Mentions } from "@skyastrall/mentions-vue";
const markup = ref("");
</script>
<template>
<Mentions
:triggers="[
{ char: '@', data: users, color: 'rgba(99,102,241,0.25)' },
{ char: '#', data: tags, color: 'rgba(16,185,129,0.25)' },
{ char: '/', data: commands, color: 'rgba(245,158,11,0.25)' },
]"
v-model="markup"
/>
</template>Features
- Multi-trigger (@mentions, #tags, /commands)
- Per-trigger highlight colors
- Ghost text / AI completions
- Async data with loading states
- Single-line mode
- Full ARIA keyboard navigation
- Controlled and uncontrolled modes
- ~5KB gzipped (~9KB core)
API Layers
<Mentions>— drop-in, works out of the box- Compound components —
MentionsEditor,MentionsPortal,MentionsList,MentionsItem useMentions()— composable, full control
See the full documentation for API reference and guides.
License
MIT — Built by SkyAstrall
