In this episode, we're kicking off the process of adding @mention functionality to our discussion forms. This is the feature you see on platforms like Twitter or Slack, where typing @
brings up a list of users you can mention in your post or reply.
We start by picking out a handy package called vue-mention
, which will help us get the core mentionable UI and mechanics working without building everything from scratch. We install the required dependencies, drop it into our "Create Discussion" form, and wrap it around our textarea where we want users to be able to mention others.
Once that's set up, we try out the package using some hard-coded user examples—"Alex", "Alexander", and "Mabel"—just to make sure the dropdown appears and updates as we type. We also take a moment to tweak the basic styles, so our mention suggestions look clickable and are easier to use with both the mouse and keyboard.
Finally, we touch on a big caveat: hard-coding user lists and loading all users at once isn’t practical, especially if your forum has thousands of members. So, we preview what’s coming next—setting up search functionality (ideally with Meilisearch) to power those suggestions dynamically as you type. If you're excited to see how we index and search users efficiently, stay tuned for the next episode!