ngx-command-palette
⌘K command palette for Angular
An accessible command palette for Angular, opened with ⌘K or Ctrl+K and built the Angular way: standalone components, signals, zoneless-ready and no dependencies besides Angular. Fuzzy search, sections, recents, async results from your API and sub-palettes, themeable with CSS variables.
- Angular 21–22
- Signals
- Zoneless
- No dependencies
- MIT
$ npm i @rrstudioapps/ngx-command-paletteHighlights
Opens with ⌘K or Ctrl+K
The shortcut is configurable and you can set several. It closes with Esc or a click outside, and full keyboard navigation (↑ ↓, Home, End, Enter, Ctrl+N and Ctrl+P) works out of the box.
Fuzzy search that ranks well
Highlighted matches, case and accent insensitive, with word starts and consecutive letters ranked higher.
Commands from your routes
Build a navigation command for every route of your router configuration, with a group, a filter and a description per route. Or write commands by hand: each one either navigates to a route or runs a function.
Async results from your API
Providers with debounce, a loading state and request cancellation, for example a customer search on your own backend.
Register commands from any component
Add commands with signals from any component; they are removed automatically when the component is destroyed. Optional Recent section kept in localStorage.
Prefix modes and sub-palettes
Type > to list actions only or @ for customers, with an optional row of hints. Open sub-palettes for theme, density and other choices.
Accessible by design
Dialog with the combobox and listbox pattern, aria-activedescendant, focus trap and focus restore, a live region and support for prefers-reduced-motion.
Themeable, no Tailwind needed
Light and dark themes through CSS variables (--rr-cp-*), and custom templates for items and the empty state. No browser globals at import time, so it is SSR friendly.
Quick start
// app.config.ts
providers: [provideCommandPalette()]
// app.ts
injectCommands([
{ id: 'settings', label: 'Settings', route: '/settings' },
{ id: 'logout', label: 'Log out', run: () => auth.logout() },
]);
// app.html
<rr-command-palette />Frequently asked questions
Which Angular versions does it support?
Angular 21 and 22. It is built with standalone components and signals, works with or without zone.js, and needs @angular/core, @angular/common and @angular/router.
Does it add dependencies to my app?
No runtime dependency besides Angular. The only exception is tslib, the small helper library that the Angular package format requires and that Angular already depends on.
Does it work with server-side rendering?
Yes. It touches no browser globals at import time, so it is SSR friendly, and it works in zoneless applications.
Is it accessible?
It follows the dialog plus combobox and listbox pattern, uses aria-activedescendant, traps and restores focus, announces results in a live region and respects prefers-reduced-motion.
How do I change how it looks?
With CSS variables prefixed --rr-cp-*, for light and dark themes. You can also replace the item and empty-state templates. Tailwind is not required.
Is it free?
Yes. It is open source under the MIT license, published on npm as @rrstudioapps/ngx-command-palette, and the source is on GitHub.
Try ngx-command-palette
The demo runs entirely in your browser on generated data.
