Case study · 2026

Mentions

@users, #tags and /commands from one headless core, in every framework.

Mentions is my open-source, framework-agnostic mention system: @users, #tags and /commands from one headless core with zero runtime dependencies, working across React, Vue, Svelte and Angular, with AI ghost-text completions built in.

Role
Creator
Stack
TypeScript · React · Vue · Svelte · Angular
Status
Open source
Mentions library documentation site

In one line One headless core drives mentions in React, Vue, Svelte and Angular. Every library I evaluated was locked to one framework.

Constraints

  • Small enough that nobody thinks twice about adding it
  • Zero runtime dependencies, so no supply-chain surface
  • One behaviour spec across four frameworks
  • Follows the WAI-ARIA combobox pattern out of the box

The build

Chat inputs keep growing the same pattern: @people, #tags, /commands. Every library I evaluated was welded to one framework and unaware that inputs now autocomplete with AI. I wrote my own core and figured other developers were stuck in the same spot.

The design bet was headless-first: a plain TypeScript engine that owns parsing, matching and selection state, with thin adapters per framework. React, Vue, Svelte and Angular each get an idiomatic wrapper around the same core, so behaviour stays identical and fixes land once. Ghost-text AI completion is a provider interface in the core rather than a bolt-on, because that is how people type now.

Decisions, including the rejected ones

Architecture

Chose: Headless TypeScript core with per-framework adapters

Rejected: A React component ported three times

Ports drift. A single engine with thin adapters keeps every framework identical in behaviour and cuts the maintenance to one surface.

Dependencies

Chose: Zero

Rejected: Pulling in a positioning or parsing library

A utility library that brings friends stops being a utility. With no dependencies, the core audits in one sitting.

AI completions

Chose: Ghost-text provider interface in the core

Rejected: Leaving AI integration to userland

Suggest-as-you-type is the modern default. Making it a provider keeps the core dependency-free while letting apps plug in any model.

What it took

  • Headless core + adapters
  • Ghost-text provider API
  • Zero-dependency build
  • Framework parity tests
  • Bundle-size checks