Mentions
@rockshin/tao-uiText areas with prefix-triggered suggestions, keyboard insertion, async options and automatic sizing.
Each example can be copied and run independently. Use the device control on framed previews to switch between desktop and phone widths.
Sizes are small, medium and large; the compatible middle alias uses the same dimensions as medium.
Examples
Controlled mentions
Typing @ opens suggestions. getMentions extracts matching tokens from the resulting text.
Mentions: alice
Multiple prefixes
onSearch receives the active prefix, so each prefix can offer its own options.
Automatic height
autoSize grows from two to six rows. More content scrolls inside the textarea.
Custom matching and disabled choices
The filter can match labels as well as values. Disabled options remain visible but cannot be inserted.
Asynchronous suggestions
This local example simulates a search delay and shows the loading state while waiting.
Custom popup content
popupRender retains the option menu and adds contextual help.
Variants and validation
Variants, sizes and validation status follow the shared control theme.
Mention on a phone
The popup follows the caret. Try top placement and a growing textarea in the phone preview.