Component libraryMention input
Mention input
ProWrite native textarea content and insert people or records from supplied suggestions.
npx shadcn@latest add @tidal-pro/mention-inputInstallation
Pro source is gated. Configure the @tidal-pro registry using the agent guide. Create an access key from your account after purchasing.
Terminal
Import components/ui/tidal.css, components/ui/mention-input.css, then add the component inside a tidal-scope wrapper. Its scoped design tokens keep it independent of your existing CSS.
Usage
Complete example source · Dependency and asset manifest
Loading the complete example…
API & behavior
Controlled string value/onValueChange with consumer-supplied typed suggestions{id,label,value,description?,insertText?,disabled?}. Optional onMentionSelect receives the selected item and exact next serialized textarea value. Optional trigger(default@), suggestionsLabel, emptyMessage, maxSuggestions(default6), description/error, disabled/readOnly/rootClassName. Native textarea name/form/required/rows/autocomplete/placeholder/input/paste/composition/focus/blur/select/click/key handlers/className/style and forwarded ref remain available; value/defaultValue/change and disabled/readOnly ARIA are owned. Trigger detection requires start, whitespace or an opening bracket; filtering matches label/value. Native textarea editing/paste/deletion serialize exactly. Keyboard Arrow keys move enabled suggestions, Enter/Tab inserts and Escape dismisses the current query. Caller handlers run first and default prevention suppresses component behavior. IME composition closes suggestions until completion. Consumers own suggestion lookup, identities, structured mention ranges, requests, persistence and submission.
Style with the --t-* CSS variables. Set data-theme="dark" on your tidal-scope wrapper for a dark surface. Motion respects the system’s reduced-motion preference.