gitwtfhub

wtf is suggest-box?

pfrazee/suggest-box — explained in plain English

Analysis updated 2026-08-11 · repo last pushed 2023-04-24

77JavaScriptAudience · developerComplexity · 2/5DormantSetup · easy

TL;DR

A JavaScript tool that adds autocomplete dropdowns to text fields on web pages, like when typing @ to mention someone. It handles the popup menu and inserts the selected suggestion into the text for you.

Mindmap

mindmap
  root((repo))
  What it does
    Autocomplete popups
    Trigger character detection
    Inserts selection at cursor
  How it works
    Decorator pattern
    Attaches to existing fields
    Custom suggester logic
  Use cases
    Chat applications
    Comment systems
    Tagging tools
  Customization
    Title subtitle image
    Trigger chars like @ or #
    Emits selection signal
  Audience
    Frontend developers
    Web app builders

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Add @mention autocomplete to a chat or comment box on your website.

REASON 2

Build a tagging field where typing # triggers a dropdown of topic suggestions.

REASON 3

Create a task assignment bar that suggests teammate names as you type in a project management app.

What's in the stack?

JavaScript

How it stacks up

pfrazee/suggest-boxaframevr/a-saturday-nightapoorvjain25/frontier
Stars777777
LanguageJavaScriptJavaScriptJavaScript
Last pushed2023-04-242017-10-13
MaintenanceDormantDormant
Setup difficultyeasyeasyeasy
Complexity2/52/53/5
Audiencedevelopervibe coderdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 5min

You must write your own CSS to style the popup since the tool only provides the interaction structure, not visual styling.

No license information is provided in the repository, so usage rights are unclear.

Wtf does this do

Suggest Box is a JavaScript tool that adds autocomplete popups to text fields on a website. It gives you the same behavior you see on GitHub or social media platforms, where typing a special character like "@" triggers a dropdown menu of suggestions. When a user types "@" and starts spelling a name, a small menu appears with matching usernames, and selecting one automatically inserts the full mention into the text. The tool works as a decorator, meaning it attaches itself to an existing text field on your webpage without replacing it. You provide it with the text field and a "suggester," which is a set of instructions on what to recommend. The suggester can be a simple list of options, or it can be a function that actively searches a database for matching results as the user types. When the user picks an option from the popup, the tool inserts the corresponding value directly into the text at the cursor's location. A developer would use this when building a chat application, a comment system, or a tagging tool. For example, if you are building a project management app and want users to assign tasks by typing a teammate's name, this tool handles the dropdown interface and insertion logic. You can configure it to watch for specific trigger characters like "@" for usernames or "#" for topics, or you can configure it to suggest options for any word typed. Each suggestion in the popup can display a title, a subtitle, and an optional image, like a user's profile photo. The tool also emits a signal when a selection is made, so the rest of your application can react to that choice. However, it provides only the basic interaction structure, you must write your own CSS to style the popup visually.

Yoink these prompts

Prompt 1
Help me add Suggest Box to my existing textarea so typing @ shows a dropdown of usernames from an array I provide. Include the decorator setup and a simple suggester function.
Prompt 2
Show me how to configure Suggest Box to trigger on both @ for usernames and # for hashtags, with each popup item showing a title, subtitle, and profile image.
Prompt 3
Write the JavaScript to connect Suggest Box to a live search API so suggestions update dynamically as the user types, and emit a signal when an option is selected so my app can react to the choice.

Frequently asked questions

wtf is suggest-box?

A JavaScript tool that adds autocomplete dropdowns to text fields on web pages, like when typing @ to mention someone. It handles the popup menu and inserts the selected suggestion into the text for you.

What language is suggest-box written in?

Mainly JavaScript. The stack also includes JavaScript.

Is suggest-box actively maintained?

Dormant — no commits in 2+ years (last push 2023-04-24).

What license does suggest-box use?

No license information is provided in the repository, so usage rights are unclear.

How hard is suggest-box to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is suggest-box for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.