Overlays
Command
A searchable list of actions. CommandPalette (alias Command) renders inline, CommandMenu opens it as a modal.
Group: Overlays. Exports: CommandPalette, CommandMenu. shadcn/ui equivalent: Command (partial parity).
Usage
import { CommandPalette } from "./halaska-kit";
CommandPalette props
itemsarray(default []): The entries to render.placeholderstring(default "Type a command or search…"): Hint shown while empty.
CommandMenu props
openboolean: Whether the overlay is shown.onClose() => void: Called when the overlay should close.itemsarray(default []): The entries to render.placeholderstring(default "Type a command or search…"): Hint shown while empty.
Accessibility
- CommandMenu is a modal dialog: focus moves to the search field, Tab stays inside, Escape or a scrim click closes it, and focus returns to the opener.
- Arrow keys move the highlight and Enter runs the highlighted item.
- The list has listbox and option roles, and aria-selected follows the highlight.
- Focus stays in the search field, and the highlighted item is announced through aria-activedescendant.
Known gaps
- No item groups or group headings.
- No separators or disabled items.
- Filtering is a plain substring match on the label, with no keywords or custom filter.
- The empty message is fixed.
Halaska UI · Components · Patterns · Screens · Install