Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Mention Autocomplete Chat Block for Solid

A design studio channel in flat rows whose composer opens on a typed @ with a docked list of people filtered as you type, Arrow Down, Enter and Tab to insert a mention, and a Mentioned you note under messages that name you.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

Complete a person into a message with this mention autocomplete chat for Solid with Ark UI. A hairline frame with a plus mark on each corner holds a window of fixed height for Cobbleline, a design studio's chat: the top bar names the studio-crit channel, and the log is flat rows of Message and Bubble, an avatar and a name over each run and a time in the gutter. The composer opens on a typed "Thanks @Ma" with a Listbox docked open above the field: up to five of six people, each with initials, a name and a role word, filtered as you type with case and accents ignored. Arrow Down moves into the list, Enter or Tab inserts "@Maya " at the caret and closes it, Escape closes it, and an empty match says who it could not find. A sent mention is medium weight with an underline, never blue, a message that names you says "Mentioned you" under it, and the person you mentioned answers after a Typing Indicator Text. The composer's Shine Button, the only colored control, sends, and the frame is ruled by Guides. It's for a team channel, a studio chat or any thread where people are called by name.

FAQ

What stays in the page, and how do I make it real?

Everything. The six people are a typed list in this file, the matching is a pure function, and the reply is picked from the first person your message mentions, written in a short script. Nothing is sent and no model runs, as the line under the composer says. To wire it for real, replace the list with your members, send the text where post says so, and turn the @Name tokens into ids on your server.

When does the list open?

When the caret sits just after an @ that starts a word, with only letters after it. An email address such as maya@example.com does nothing, because its @ is inside a word. The list is cut at five people, matches the start of a name, and ignores case and accents, so "mar" finds Marek and "Hänne" finds Hanne.

Which keys work in the field?

Arrow Down moves focus into the list, where the arrow keys move the highlight and Enter picks. In the field itself Enter or Tab takes the first match, Escape closes the list, and with the list closed Enter sends and Shift and Enter add a line. The caret lands just after the inserted mention, so you can keep typing.

How do I know a message mentioned me?

Under any message from someone else that contains "@You" there is a small "Mentioned you" line with an at-sign glyph. It is a word, not a color, and the message text carries the mention in medium weight with an underline. Replace the check with your own user id in a real app.

Is it usable with a keyboard and a screen reader?

The list is a labelled listbox ("Mention a person") and the one status line reads how many people match and which key chooses. The log is a focusable region announced as a log, every message starts with a hidden name and time, and the field's description lists the keys. Avatars are hidden from assistive technology because names are always in text.

How does it look on a phone?

The same single column: the docked list sits over the bottom of the log and spans the width of the composer, rows show the role word beside the name, and the times in the gutter are always visible instead of on hover. The window keeps its height and only the log scrolls.