Skip to main content
NeuralUIv1.14.3New
GitHub
Component

Command Palette

Global command palette with fuzzy search, keyboard shortcuts and service-driven command registration

TypeScript
import {
  NeuCommandPaletteComponent,
  NeuCommandPaletteService,
} from '@neural-ui/core/command-palette';
🏠 Go to HomeG H
📖 Open Documentation
🌑 Switch to dark theme
☀️ Switch to light theme
🔔 Send test notification
TypeScript
import { NeuCommandPaletteComponent } from '@neural-ui/core/command-palette';
import { NeuCommandPaletteService } from '@neural-ui/core/command-palette';

// 1. Place the component once in the root layout:
// <neu-command-palette />

// 2. Register commands from any component:
@Component({ ... })
export class MyFeatureComponent implements OnInit, OnDestroy {
  private readonly _palette = inject(NeuCommandPaletteService);

  ngOnInit() {
    this._palette.register({
      id: 'my.save',
      label: 'Save changes',
      group: 'Editing',
      shortcut: '⌘S',
      action: () => this.save()
    });
  }

  ngOnDestroy() {
    this._palette.unregister('my.save');
  }
}