Command

Fast, composable, styled command menu for Angular.

PreviousNext
Use arrow keys to navigate, Enter to select, Escape to clear selection.
Create new project⌘N
Open file⌘O
Save all⌘S
Go to Dashboard⌘1
Go to Projects⌘2
Open terminal⌘T
Toggle theme⌘D

Installation

1

Run the CLI

Use the CLI to add the component to your project.

npx @ngzard/ui@latest add command

Examples

default

Use arrow keys to navigate, Enter to select, Escape to clear selection.
Create new project⌘N
Open file⌘O
Save all⌘S
Go to Dashboard⌘1
Go to Projects⌘2
Open terminal⌘T
Toggle theme⌘D

API

[z-command] Component

The main command palette container that handles search input and keyboard navigation. Features intelligent debounced search, ARIA accessibility, and comprehensive keyboard navigation.

Property Description Type Default
size Size of the command palette sm | default | lg | xl default
class Additional CSS classes string ''

Events

Event Description Type
zCommandChange Fired when the selected option changes output<ZardCommandOption>
zCommandSelected Fired when an option is selected output<ZardCommandOption>

[z-command-input] Component

Search input component with debounced input handling and accessibility features.

Property Description Type Default
placeholder Placeholder text for input string Type a command or search...
class Additional CSS classes string ''

Events

Event Description Type
valueChange Fired when input value changes EventEmitter<string>

[z-command-list] Component

Container for command options with proper ARIA listbox semantics.

Property Description Type Default
class Additional CSS classes string ''

[z-command-empty] Component

Displays when no search results are found. Automatically shows/hides based on search state.

Property Description Type Default
class Additional CSS classes string ''

[z-command-option] Component

Individual selectable option within the command palette with enhanced accessibility and interaction features.

Property Description Type Default
zValue Value of the option (required) any -
zLabel Label text (required) string -
zIcon Icon HTML content string ''
zCommand Command identifier string ''
zShortcut Keyboard shortcut display string ''
zDisabled Disabled state boolean false
variant Visual variant default | destructive default
class Additional CSS classes string ''

[z-command-option-group] Component

Groups related command options together with semantic grouping and accessibility.

Property Description Type Default
zLabel Group label (required) string -
class Additional CSS classes string ''

[z-command-divider] Component

Visual separator between command groups with semantic role.

Property Description Type Default
class Additional CSS classes string ''