Command
A command menu. Type to find a command, use the arrows to move, and press Enter to run it, on a page or in a dialog from ⌘K.
Examples
In a dialog
Press the search button to open the menu over the page, run a command, and see the issue change. In your app, useShortcut opens it from ⌘K.
On a page
Without its dialog, the menu sits on the page as a box, and moves to the height of what matches as you type.
Pages
A command that needs a choice opens a page: give pages the names of the open pages and items the current page’s rows. The new page pushes the last one out, and Escape, Backspace or the page’s name goes back.
Nothing matches
CommandEmpty takes the rows’ place and says what was looked for. Delete a letter to bring the commands back.
Installation
npx shadcn@latest add https://kinoui.com/r/command.json- Files
lib/reduce-motion.tslib/scroll.tslib/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/flow.tslib/panel.tsxcomponents/kino/dialog.tsxcomponents/kino/command.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
Command
CommandDialog
CSS variables
Accessibility
- The search is a combobox and the rows a listbox: focus stays in the search, the arrows move the highlight, and Enter runs the highlighted command.
- Escape clears the search first, then goes back a page, and only then closes the dialog. Backspace on an empty search goes back too.
- Opening or leaving a page is read out, since the search’s new name alone isn’t.
- The dialog moves focus to the search when it opens and back to what opened it when it closes. Name it with
title. - When the system asks for less motion, pages fade in place of sliding and the box changes height at once.