Trigger menu
Suggestions that open at a character typed in a field, such as @ for people or / for commands, and put the pick in place of what was typed.
npx shadcn add https://kinoui.com/r/trigger-menu.jsonCopy install command
Examples
KN-2481Ship the replacement card readerPRPriya Raman · In progress
Default
Type @ to mention someone, # to link an issue, or / at the start of a line for a command: the list opens under the character, narrows as you type, and Enter or Tab puts the pick in its place.
One-line field
TriggerMenuInput is a single line, such as a task’s title: # files it under a project and @ assigns it.
Announcement
From a server
onMatchChange tells you what is typed after the trigger, so you can ask a server and render what it answers. TriggerMenuEmpty says it is looking until the rows arrive.
Installation
Copy code
npx shadcn@latest add https://kinoui.com/r/trigger-menu.json- Files
lib/reduce-motion.tslib/scroll.tslib/trigger-editor.tsxlib/refs.tslib/resize.tslib/swap.tsxlib/popup.tslib/glide.tsxcomponents/kino/tooltip.tsxlib/cut.tsxcomponents/kino/spinner.tsxcomponents/kino/button.tsxcomponents/kino/input.tsxcomponents/kino/separator.tsxlib/run-progress.tslib/highlight.tslib/menu.tsxcomponents/kino/select.tsxlib/filter-list.tsxlib/announce.tsxcomponents/kino/textarea.tsxcomponents/kino/trigger-menu.tsx- Packages
@base-ui/reactclass-variance-authority- Global CSS
- the feels, the density tokens, the shape tokens and the success and warning colours
New to Kino? Installation covers what your project needs first and the @kino namespace.
API reference
TriggerMenu
TriggerMenuContent
TriggerMenuItem
Accessibility
- Focus stays in the field. It points at the list with
aria-controlsand at the highlighted row witharia-activedescendant, which a screen reader reads as the highlight moves. A one-line field is a combobox. - It opens as a trigger is typed. Moving the caret into a mention already written leaves it shut, so Enter there is still a new line; Ctrl+Space opens it there.
- Arrow keys move the highlight, Enter or Tab puts it in, and Escape closes the list without leaving a dialog around the field. Typing on doesn’t bring it back; Ctrl+Space does.
- An insert is one step in the field’s own undo, so ⌘Z or Ctrl+Z brings back what was typed.
- How many suggestions there are is said once typing pauses, and what
TriggerMenuEmptysays when there are none. - Name the field with a label,
aria-labeloraria-labelledby, and the list with its trigger’slabel. - When the system asks for less motion, the box fades instead of growing, and changes height at once.