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';Open palette
Commands registered in this demo
๐ 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');
}
}