BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/more-shadcn-noair/mention-input

Mention Input

more-shadcn-noair/mention-input
FreeComponent

An input or textarea that opens a filterable list when you type a trigger character.

Live preview

live · rendered by the registry
Rendered by more-shadcn-noair on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://more-shadcn.noair.fun/r/mention-input.json

Source

registry itemmore-shadcn.noair.fun/r/mention-input.json · first 6 KB
1<script lang="ts" module>
2 export type MentionItem = {
3 id: string;
4 label: string;
5 description?: string;
6 keywords?: string[];
7 [key: string]: unknown;
8 };
9</script>
10
11<script lang="ts">
12 import { cn } from '$UTILS$';
13 import { tick } from 'svelte';
14 import { fly } from 'svelte/transition';
15 import type { Snippet } from 'svelte';
16
17 let {
18 value = $bindable(''),
19 items = [],
20 trigger = '@',
21 placeholder = 'Type @ to mention someone...',
22 disabled = false,
23 multiline = true,
24 rows = 4,
25 maxItems = 8,
26 insertSpace = true,
27 class: className,
28 filter,
29 onmention,
30 itemSnippet,
31 emptySnippet,
32 ...rest
33 }: {
34 value?: string;
35 items?: MentionItem[];
36 trigger?: string;
37 placeholder?: string;
38 disabled?: boolean;
39 /** Render a `<textarea>`; set to false for a single-line `<input>`. */
40 multiline?: boolean;
41 rows?: number;
42 maxItems?: number;
43 insertSpace?: boolean;
44 class?: string;
45 filter?: (items: MentionItem[], query: string) => MentionItem[];
46 onmention?: (item: MentionItem) => void;
47 itemSnippet?: Snippet<[MentionItem, boolean]>;
48 emptySnippet?: Snippet<[string]>;
49 [key: string]: unknown;
50 } = $props();
51
52 type Field = HTMLTextAreaElement | HTMLInputElement;
53
54 let fieldRef = $state<Field | null>(null);
55 let listRef = $state<HTMLDivElement | null>(null);
56
57 const uid = $props.id();
58 const listId = `mention-input-list-${uid}`;
59
60 let isOpen = $state(false);
61 let query = $state('');
62 let activeIndex = $state(0);
63 /** Index of the trigger character in `value`. */
64 let anchorIndex = $state(-1);
65 let caret = $state({ top: 0, left: 0, height: 20 });
66
67 const defaultFilter = (list: MentionItem[], q: string) => {
68 if (!q) return list;
69 const needle = q.toLowerCase();
70 return list.filter((item) => {
71 if (item.label.toLowerCase().includes(needle)) return true;
72 if (item.description?.toLowerCase().includes(needle)) return true;
73 return item.keywords?.some((k) => k.toLowerCase().includes(needle)) ?? false;
74 });
75 };
76
77 const results = $derived.by(() => {
78 const filtered = (filter ?? defaultFilter)(items, query);
79 return maxItems > 0 ? filtered.slice(0, maxItems) : filtered;
80 });
81
82 function close() {
83 isOpen = false;
84 anchorIndex = -1;
85 query = '';
86 activeIndex = 0;
87 }
88
89 /**
90 * Mirrors the field into a hidden div to find the pixel offset of the caret,
91 * so the popover can be anchored to the trigger character instead of the field.
92 */
93// … truncated

Facts

Registry
more-shadcn-noair
Type
registry:ui
Access
Free
Files written
0
Licence
the repository states none
In the index
at or before 2026-08-13
Last confirmed
today

Go to the source

Docs on more-shadcn-noair more-shadcn.noair.fun Raw registry item This item as JSON

More from more-shadcn-noair

All 43 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Audioaudiomore-shadcn-noairComponentsFreeno deps
Audio Waveaudio-wavemore-shadcn-noairComponentsFreeno deps
Autocompleteautocompletemore-shadcn-noairComponentsFreeno deps
Bannerbannermore-shadcn-noairComponentsFreeno deps
Big Calendarbig-calendarmore-shadcn-noairComponentsFreeno deps
Bottom Navigationbottom-navmore-shadcn-noairComponentsFreeno deps
Canvascanvasmore-shadcn-noairComponentsFreeno deps
Chipchipmore-shadcn-noairComponentsFreeno deps

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex