Give every command a unique id and a kind: action, router or link. Action commands emit commandAction; handle the id in your application. Router and link commands use their native destinations. Open with the trigger or the built-in Ctrl/Meta+K shortcut. shortcut is visual metadata, not a registered hotkey. Use the item Template for content only, without a nested interactive control.
Give every command a unique id and a kind: action, router or link. Action commands emit commandAction; handle the id in your application. Router and link commands use their native destinations. Open with the trigger or the built-in Ctrl/Meta+K shortcut. shortcut is visual metadata, not a registered hotkey. Use the item Template for content only, without a nested interactive control.
Inputs, models and Outputs are extracted from the installed Core package. Named public types link to their definitions. Templates below include executable examples.
Inputs
Configure the component with [property]="value". Your application supplies these values; the component does not replace the state you pass in.
Emits the activated action command; handle its id in application code. Link commands use their native destinations.
Templates
ng-content projects content into the component. TemplateRef inputs receive a template; ng-template directives identify templates with a typed context. A directive shared by an entrypoint is not necessarily a slot of this component.
import { NeuCommandPaletteItemDirective } from '@neural-ui/core/command-palette';
// Public declaration (reference only)
export declare class NeuCommandPaletteItemDirective {
}
context.d.ts
import type { NeuCommandPaletteItemContext } from '@neural-ui/core/command-palette';
import { NeuCommandPaletteItemDirective } from '@neural-ui/core/command-palette';
// Public declaration (reference only)
readonly templateRef: TemplateRef<NeuCommandPaletteItemContext>;
Each example demonstrates a different template. Switch between Demo and Code to inspect its implementation, imports and state.
NeuCommandPaletteItemDirective
NeuCommandPaletteItemDirective
NeuCommandPaletteItemDirective
Events: 0
Public methods
Name
Contract
close
close(): void;
open
open(): void;
Public Types
Open a type to inspect its definition and interface fields.
NeuCommand.d.ts
import type { NeuCommandAction } from '@neural-ui/core/command-palette';
import type { NeuCommandLink } from '@neural-ui/core/command-palette';
import type { NeuCommandRouterLink } from '@neural-ui/core/command-palette';
import type { NeuCommand } from '@neural-ui/core/command-palette';
// Public declaration (reference only)
export type NeuCommand = NeuCommandAction | NeuCommandRouterLink | NeuCommandLink;
NeuCommandAction.d.ts
import type { NeuCommandBase } from '@neural-ui/core/command-palette';
import type { NeuCommandAction } from '@neural-ui/core/command-palette';
// Public declaration (reference only)
export interface NeuCommandAction extends NeuCommandBase {
readonly action?: never;
readonly href?: never;
readonly kind: 'action';
readonly routerLink?: never;
readonly target?: never;
}
Use the supported public tokens listed below. Surrounding layout belongs to your application; validate the result in light and dark modes and narrow containers.
Specific tokens
This component uses shared theme tokens rather than dedicated component hooks.
Shared tokens used
Override these on a local wrapper to affect this example. An override on :root affects other components that use the same token.
Token
Purpose here
Other impact
Default / fallback
--neu-border
Normal control and cell borders
Shared by other Core consumers; scope the override.
rgba(15, 23, 42, 0.08)
--neu-primary
Brand color for active controls and emphasis
Shared by other Core consumers; scope the override.
#007aff
--neu-primary-50
Subtle brand surface for hover and focus states
Shared by other Core consumers; scope the override.
#eff6ff
--neu-surface
Main field, header or control surface
Shared by other Core consumers; scope the override.
#ffffff
--neu-surface-2
Secondary surfaces and alternating rows
Shared by other Core consumers; scope the override.
#f1f5f9
--neu-text
Main text and inherited icon color
Shared by other Core consumers; scope the override.
#0f172a
--neu-text-muted
Secondary labels and supporting content
Shared by other Core consumers; scope the override.
#475569
--neu-cmd-shadow
Surface or overlay elevation
Shared by other Core consumers; scope the override.