- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Attachment
- Autocomplete
- Avatar
- Badge
- Breadcrumb
- Bubble
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Code Block
- Collapsible
- Combobox
- Command
- Context Menu
- Data Table
- Date Picker
- Dialog
- Drawer
- Dropdown Menu
- Empty
- Field
- Hover Card
- Input Group
- Input OTP
- Input
- Item
- Kbd
- Label
- Marker
- Menubar
- Message
- Message Scroller
- Native Select
- Navigation Menu
- Pagination
- Popover
- Progress
- Questionnaire
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner (Toast)
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toggle
- Toggle Group
- Tooltip
- Trace
Command
Fast, composable, command menu for Angular.
import { Component } from '@angular/core';
import { NgIcon, provideIcons } from '@ng-icons/core';
import {
lucideCalculator,
lucideCalendar,
lucideCog,
lucidePlus,
lucideSearch,
lucideSmile,
lucideUser,
lucideWallet,
} from '@ng-icons/lucide';
import { HlmCard, HlmCardImports } from '@spartan-ng/helm/card';
import { HlmCommandImports } from '@spartan-ng/helm/command';
@Component({
selector: 'spartan-command-preview',
imports: [HlmCommandImports, HlmCardImports, NgIcon],
providers: [
provideIcons({
lucideSearch,
lucideCalendar,
lucideSmile,
lucidePlus,
lucideUser,
lucideWallet,
lucideCog,
lucideCalculator,
}),
],
hostDirectives: [HlmCard],
host: {
class: 'w-full py-0',
},
template: `
<div hlmCardContent class="p-0">
<hlm-command>
<hlm-command-input placeholder="Type a command or search..." />
<hlm-command-list>
<div *hlmCommandEmptyState hlmCommandEmpty>No results found.</div>
<hlm-command-group>
<hlm-command-group-label>Suggestions</hlm-command-group-label>
<button hlm-command-item value="Calendar">
<ng-icon name="lucideCalendar" />
Calendar
</button>
<button hlm-command-item value="Search Emoji">
<ng-icon name="lucideSmile" />
Search Emoji
</button>
<button hlm-command-item value="Calculator" disabled>
<ng-icon name="lucideCalculator" />
Calculator
</button>
</hlm-command-group>
<hlm-command-separator />
<hlm-command-group>
<hlm-command-group-label>Settings</hlm-command-group-label>
<button hlm-command-item value="Profile">
<ng-icon name="lucideUser" />
Profile
<hlm-command-shortcut>⌘P</hlm-command-shortcut>
</button>
<button hlm-command-item value="Billing">
<ng-icon name="lucideWallet" />
Billing
<hlm-command-shortcut>⌘B</hlm-command-shortcut>
</button>
<button hlm-command-item value="Settings">
<ng-icon name="lucideCog" />
Settings
<hlm-command-shortcut>⌘S</hlm-command-shortcut>
</button>
</hlm-command-group>
</hlm-command-list>
</hlm-command>
</div>
`,
})
export class CommandPreview {}Installation
ng g @spartan-ng/cli:ui commandnx g @spartan-ng/cli:ui commandUsage
import { HlmCommandImports } from '@spartan-ng/helm/command';<hlm-command>
<hlm-command-input placeholder="Type a command or search..." />
<hlm-command-list>
<div *hlmCommandEmptyState hlmCommandEmpty>No results found.</div>
<hlm-command-group>
<hlm-command-group-label>Suggestions</hlm-command-group-label>
<button hlm-command-item value="Calendar">
<ng-icon name="lucideCalendar" />
Calendar
</button>
</hlm-command-group>
<hlm-command-separator />
<hlm-command-group>
<hlm-command-group-label>Settings</hlm-command-group-label>
<button hlm-command-item value="Profile">
<ng-icon name="lucideUser" />
Profile
<hlm-command-shortcut>⌘P</hlm-command-shortcut>
</button>
</hlm-command-group>
</hlm-command-list>
</hlm-command>Examples
Basic
import { Component, signal } from '@angular/core';
import { HlmButtonImports } from '@spartan-ng/helm/button';
import { HlmCommandImports } from '@spartan-ng/helm/command';
@Component({
selector: 'spartan-command-basic',
imports: [HlmCommandImports, HlmButtonImports],
template: `
<div class="mx-auto flex max-w-screen-sm items-center justify-center space-x-4 py-20 text-sm">
<button hlmBtn variant="outline" (click)="stateChanged('open')">Open Menu</button>
</div>
<hlm-command-dialog [state]="state()" (stateChange)="stateChanged($event)">
<hlm-command>
<hlm-command-input placeholder="Type a command or search..." />
<hlm-command-list>
<div *hlmCommandEmptyState hlmCommandEmpty>No results found.</div>
<hlm-command-group>
<hlm-command-group-label>Suggestions</hlm-command-group-label>
<button hlm-command-item value="calendar" (selected)="commandSelected('calendar')">Calendar</button>
<button hlm-command-item value="emoji" (selected)="commandSelected('emoji')">Search Emoji</button>
<button hlm-command-item value="calculator" (selected)="commandSelected('calculator')">Calculator</button>
</hlm-command-group>
</hlm-command-list>
</hlm-command>
</hlm-command-dialog>
`,
})
export class CommandBasic {
public readonly command = signal('');
public readonly state = signal<'closed' | 'open'>('closed');
stateChanged(state: 'open' | 'closed') {
this.state.set(state);
}
commandSelected(selected: string) {
this.state.set('closed');
this.command.set(selected);
}
}Shortcuts
import { Component, signal } from '@angular/core';
import { NgIcon, provideIcons } from '@ng-icons/core';
import {
lucideCalendar,
lucideCog,
lucideLayers,
lucidePlus,
lucideSearch,
lucideSmile,
lucideUser,
lucideX,
} from '@ng-icons/lucide';
import { HlmButton } from '@spartan-ng/helm/button';
import { HlmCommandImports } from '@spartan-ng/helm/command';
@Component({
selector: 'spartan-command-shortcuts',
imports: [HlmCommandImports, HlmButton, NgIcon],
providers: [
provideIcons({
lucideX,
lucideCalendar,
lucideSmile,
lucidePlus,
lucideUser,
lucideLayers,
lucideCog,
lucideSearch,
}),
],
template: `
<div class="mx-auto flex max-w-screen-sm items-center justify-center space-x-4 py-20 text-sm">
<button hlmBtn variant="outline" (click)="stateChanged('open')">Open Menu</button>
</div>
<hlm-command-dialog [state]="state()" (stateChange)="stateChanged($event)">
<hlm-command>
<hlm-command-input placeholder="Type a command or search..." />
<hlm-command-list>
<div *hlmCommandEmptyState hlmCommandEmpty>No results found.</div>
<hlm-command-group>
<hlm-command-group-label>Settings</hlm-command-group-label>
<button hlm-command-item value="profile" (selected)="commandSelected('profile')">
<ng-icon name="lucideUser" />
Profile
<hlm-command-shortcut>⌘P</hlm-command-shortcut>
</button>
<button hlm-command-item value="billing" (selected)="commandSelected('billing')">
<ng-icon name="lucideLayers" />
Billing
<hlm-command-shortcut>⌘B</hlm-command-shortcut>
</button>
<button hlm-command-item value="settings" (selected)="commandSelected('settings')">
<ng-icon name="lucideCog" />
Settings
<hlm-command-shortcut>⌘S</hlm-command-shortcut>
</button>
</hlm-command-group>
</hlm-command-list>
</hlm-command>
</hlm-command-dialog>
`,
})
export class CommandShortcuts {
public readonly command = signal('');
public readonly state = signal<'closed' | 'open'>('closed');
stateChanged(state: 'open' | 'closed') {
this.state.set(state);
}
commandSelected(selected: string) {
this.state.set('closed');
this.command.set(selected);
}
}Groups
import { Component, signal } from '@angular/core';
import { NgIcon, provideIcons } from '@ng-icons/core';
import { lucideCalendar, lucideCog, lucideLayers, lucidePlus, lucideSmile, lucideUser } from '@ng-icons/lucide';
import { HlmButton } from '@spartan-ng/helm/button';
import { HlmCommandImports } from '@spartan-ng/helm/command';
@Component({
selector: 'spartan-command-groups',
imports: [HlmCommandImports, HlmButton, NgIcon],
providers: [
provideIcons({
lucideCalendar,
lucideSmile,
lucidePlus,
lucideUser,
lucideLayers,
lucideCog,
}),
],
template: `
<div class="mx-auto flex max-w-screen-sm items-center justify-center space-x-4 py-20 text-sm">
<button hlmBtn variant="outline" (click)="stateChanged('open')">Open Menu</button>
</div>
<hlm-command-dialog [state]="state()" (stateChange)="stateChanged($event)">
<hlm-command>
<hlm-command-input placeholder="Type a command or search..." />
<hlm-command-list>
<div *hlmCommandEmptyState hlmCommandEmpty>No results found.</div>
<hlm-command-group>
<hlm-command-group-label>Suggestions</hlm-command-group-label>
<button hlm-command-item value="calendar" (selected)="commandSelected('calendar')">
<ng-icon name="lucideCalendar" />
Calendar
</button>
<button hlm-command-item value="emojy" (selected)="commandSelected('emojy')">
<ng-icon name="lucideSmile" />
Search Emoji
</button>
<button hlm-command-item value="calculator" (selected)="commandSelected('calculator')">
<ng-icon name="lucidePlus" />
Calculator
</button>
</hlm-command-group>
<hlm-command-separator />
<hlm-command-group>
<hlm-command-group-label>Settings</hlm-command-group-label>
<button hlm-command-item value="profile" (selected)="commandSelected('profile')">
<ng-icon name="lucideUser" />
Profile
<hlm-command-shortcut>⌘P</hlm-command-shortcut>
</button>
<button hlm-command-item value="billing" (selected)="commandSelected('billing')">
<ng-icon name="lucideLayers" />
Billing
<hlm-command-shortcut>⌘B</hlm-command-shortcut>
</button>
<button hlm-command-item value="settings" (selected)="commandSelected('settings')">
<ng-icon name="lucideCog" />
Settings
<hlm-command-shortcut>⌘S</hlm-command-shortcut>
</button>
</hlm-command-group>
</hlm-command-list>
</hlm-command>
</hlm-command-dialog>
`,
})
export class CommandGroups {
public readonly command = signal('');
public readonly state = signal<'closed' | 'open'>('closed');
stateChanged(state: 'open' | 'closed') {
this.state.set(state);
}
commandSelected(selected: string) {
this.state.set('closed');
this.command.set(selected);
}
}Scrollable
import { Component, signal } from '@angular/core';
import { NgIcon, provideIcons } from '@ng-icons/core';
import {
lucideBell,
lucideCalculator,
lucideCalendar,
lucideCircleHelp,
lucideClipboardPaste,
lucideCode,
lucideCog,
lucideCopy,
lucideCreditCard,
lucideFileText,
lucideFolder,
lucideFolderPlus,
lucideHouse,
lucideImage,
lucideInbox,
lucideLayoutGrid,
lucideList,
lucidePlus,
lucideScissors,
lucideTrash2,
lucideUser,
lucideZoomIn,
lucideZoomOut,
} from '@ng-icons/lucide';
import { HlmButton } from '@spartan-ng/helm/button';
import { HlmCommandImports } from '@spartan-ng/helm/command';
@Component({
selector: 'spartan-command-scrollable',
imports: [HlmCommandImports, HlmButton, NgIcon],
providers: [
provideIcons({
lucideHouse,
lucideInbox,
lucideFileText,
lucideFolder,
lucidePlus,
lucideFolderPlus,
lucideCopy,
lucideScissors,
lucideClipboardPaste,
lucideTrash2,
lucideLayoutGrid,
lucideList,
lucideZoomIn,
lucideZoomOut,
lucideUser,
lucideCreditCard,
lucideCog,
lucideBell,
lucideCircleHelp,
lucideCalculator,
lucideCalendar,
lucideImage,
lucideCode,
}),
],
template: `
<div class="mx-auto flex max-w-screen-sm items-center justify-center space-x-4 py-20 text-sm">
<button hlmBtn variant="outline" (click)="stateChanged('open')">Open Menu</button>
</div>
<hlm-command-dialog [state]="state()" (stateChange)="stateChanged($event)">
<hlm-command>
<hlm-command-input placeholder="Type a command or search..." />
<hlm-command-list>
<div *hlmCommandEmptyState hlmCommandEmpty>No results found.</div>
<!-- Navigation -->
<hlm-command-group>
<hlm-command-group-label>Navigation</hlm-command-group-label>
<button hlm-command-item value="home" (selected)="commandSelected('home')">
<ng-icon name="lucideHouse" />
Home
<hlm-command-shortcut>⌘H</hlm-command-shortcut>
</button>
<button hlm-command-item value="inbox" (selected)="commandSelected('inbox')">
<ng-icon name="lucideInbox" />
Inbox
<hlm-command-shortcut>⌘I</hlm-command-shortcut>
</button>
<button hlm-command-item value="documents" (selected)="commandSelected('documents')">
<ng-icon name="lucideFileText" />
Documents
<hlm-command-shortcut>⌘D</hlm-command-shortcut>
</button>
<button hlm-command-item value="folders" (selected)="commandSelected('folders')">
<ng-icon name="lucideFolder" />
Folders
<hlm-command-shortcut>⌘F</hlm-command-shortcut>
</button>
</hlm-command-group>
<hlm-command-separator />
<!-- Actions -->
<hlm-command-group>
<hlm-command-group-label>Actions</hlm-command-group-label>
<button hlm-command-item value="new-file" (selected)="commandSelected('new-file')">
<ng-icon name="lucidePlus" />
New File
<hlm-command-shortcut>⌘N</hlm-command-shortcut>
</button>
<button hlm-command-item value="new-folder" (selected)="commandSelected('new-folder')">
<ng-icon name="lucideFolderPlus" />
New Folder
<hlm-command-shortcut>⇧⌘N</hlm-command-shortcut>
</button>
<button hlm-command-item value="copy" (selected)="commandSelected('copy')">
<ng-icon name="lucideCopy" />
Copy
<hlm-command-shortcut>⌘C</hlm-command-shortcut>
</button>
<button hlm-command-item value="cut" (selected)="commandSelected('cut')">
<ng-icon name="lucideScissors" />
Cut
<hlm-command-shortcut>⌘X</hlm-command-shortcut>
</button>
<button hlm-command-item value="paste" (selected)="commandSelected('paste')">
<ng-icon name="lucideClipboardPaste" />
Paste
<hlm-command-shortcut>⌘V</hlm-command-shortcut>
</button>
<button hlm-command-item value="delete" (selected)="commandSelected('delete')">
<ng-icon name="lucideTrash2" />
Delete
<hlm-command-shortcut>⌫</hlm-command-shortcut>
</button>
</hlm-command-group>
<hlm-command-separator />
<!-- View -->
<hlm-command-group>
<hlm-command-group-label>View</hlm-command-group-label>
<button hlm-command-item value="grid-view" (selected)="commandSelected('grid-view')">
<ng-icon name="lucideLayoutGrid" />
Grid View
</button>
<button hlm-command-item value="list-view" (selected)="commandSelected('list-view')">
<ng-icon name="lucideList" />
List View
</button>
<button hlm-command-item value="zoom-in" (selected)="commandSelected('zoom-in')">
<ng-icon name="lucideZoomIn" />
Zoom In
<hlm-command-shortcut>⌘+</hlm-command-shortcut>
</button>
<button hlm-command-item value="zoom-out" (selected)="commandSelected('zoom-out')">
<ng-icon name="lucideZoomOut" />
Zoom Out
<hlm-command-shortcut>⌘-</hlm-command-shortcut>
</button>
</hlm-command-group>
<hlm-command-separator />
<!-- Account -->
<hlm-command-group>
<hlm-command-group-label>Account</hlm-command-group-label>
<button hlm-command-item value="profile" (selected)="commandSelected('profile')">
<ng-icon name="lucideUser" />
Profile
<hlm-command-shortcut>⌘P</hlm-command-shortcut>
</button>
<button hlm-command-item value="billing" (selected)="commandSelected('billing')">
<ng-icon name="lucideCreditCard" />
Billing
<hlm-command-shortcut>⌘B</hlm-command-shortcut>
</button>
<button hlm-command-item value="settings" (selected)="commandSelected('settings')">
<ng-icon name="lucideCog" />
Settings
<hlm-command-shortcut>⌘S</hlm-command-shortcut>
</button>
<button hlm-command-item value="notifications" (selected)="commandSelected('notifications')">
<ng-icon name="lucideBell" />
Notifications
</button>
<button hlm-command-item value="help" (selected)="commandSelected('help')">
<ng-icon name="lucideCircleHelp" />
Help & Support
</button>
</hlm-command-group>
<hlm-command-separator />
<!-- Tools -->
<hlm-command-group>
<hlm-command-group-label>Tools</hlm-command-group-label>
<button hlm-command-item value="calculator" (selected)="commandSelected('calculator')">
<ng-icon name="lucideCalculator" />
Calculator
</button>
<button hlm-command-item value="calendar" (selected)="commandSelected('calendar')">
<ng-icon name="lucideCalendar" />
Calendar
</button>
<button hlm-command-item value="image-editor" (selected)="commandSelected('image-editor')">
<ng-icon name="lucideImage" />
Image Editor
</button>
<button hlm-command-item value="code-editor" (selected)="commandSelected('code-editor')">
<ng-icon name="lucideCode" />
Code Editor
</button>
</hlm-command-group>
</hlm-command-list>
</hlm-command>
</hlm-command-dialog>
`,
})
export class CommandScrollable {
public readonly command = signal('');
public readonly state = signal<'closed' | 'open'>('closed');
stateChanged(state: 'open' | 'closed') {
this.state.set(state);
}
commandSelected(selected: string) {
this.state.set('closed');
this.command.set(selected);
}
}RTL
To enable RTL support in spartan-ng, see the RTL configuration guide.
import { Component, computed, inject } from '@angular/core';
import { NgIcon, provideIcons } from '@ng-icons/core';
import {
lucideCalculator,
lucideCalendar,
lucideCog,
lucidePlus,
lucideSearch,
lucideSmile,
lucideUser,
lucideWallet,
} from '@ng-icons/lucide';
import { TranslateService, Translations } from '@spartan-ng/app/app/shared/translate.service';
import { HlmCard, HlmCardImports } from '@spartan-ng/helm/card';
import { HlmCommandImports } from '@spartan-ng/helm/command';
@Component({
selector: 'spartan-command-rtl',
imports: [HlmCommandImports, HlmCardImports, NgIcon],
providers: [
provideIcons({
lucideSearch,
lucideCalendar,
lucideSmile,
lucidePlus,
lucideUser,
lucideWallet,
lucideCog,
lucideCalculator,
}),
],
hostDirectives: [HlmCard],
host: {
class: 'w-full py-0',
'[attr.dir]': '_dir()',
},
template: `
<div hlmCardContent class="p-0">
<hlm-command>
<hlm-command-input [placeholder]="_t()['placeholder']" />
<hlm-command-list>
<div *hlmCommandEmptyState hlmCommandEmpty>{{ _t()['empty'] }}</div>
<hlm-command-group>
<hlm-command-group-label>{{ _t()['suggestions'] }}</hlm-command-group-label>
<button hlm-command-item value="Calendar">
<ng-icon name="lucideCalendar" />
{{ _t()['calendar'] }}
</button>
<button hlm-command-item value="Search Emoji">
<ng-icon name="lucideSmile" />
{{ _t()['searchEmoji'] }}
</button>
<button hlm-command-item value="Calculator" disabled>
<ng-icon name="lucideCalculator" />
{{ _t()['calculator'] }}
</button>
</hlm-command-group>
<hlm-command-separator />
<hlm-command-group>
<hlm-command-group-label>{{ _t()['settings'] }}</hlm-command-group-label>
<button hlm-command-item value="Profile">
<ng-icon name="lucideUser" />
{{ _t()['profile'] }}
<hlm-command-shortcut>⌘P</hlm-command-shortcut>
</button>
<button hlm-command-item value="Billing">
<ng-icon name="lucideWallet" />
{{ _t()['billing'] }}
<hlm-command-shortcut>⌘B</hlm-command-shortcut>
</button>
<button hlm-command-item value="Settings">
<ng-icon name="lucideCog" />
{{ _t()['settings'] }}
<hlm-command-shortcut>⌘S</hlm-command-shortcut>
</button>
</hlm-command-group>
</hlm-command-list>
</hlm-command>
</div>
`,
})
export class CommandRtl {
private readonly _language = inject(TranslateService).language;
private readonly _translations: Translations = {
en: {
dir: 'ltr',
values: {
placeholder: 'Type a command or search...',
empty: 'No results found.',
suggestions: 'Suggestions',
calendar: 'Calendar',
searchEmoji: 'Search Emoji',
calculator: 'Calculator',
settings: 'Settings',
profile: 'Profile',
billing: 'Billing',
},
},
ar: {
dir: 'rtl',
values: {
placeholder: 'اكتب أمرًا أو ابحث...',
empty: 'لم يتم العثور على نتائج.',
suggestions: 'اقتراحات',
calendar: 'التقويم',
searchEmoji: 'البحث عن الرموز التعبيرية',
calculator: 'الآلة الحاسبة',
settings: 'الإعدادات',
profile: 'الملف الشخصي',
billing: 'الفوترة',
},
},
he: {
dir: 'rtl',
values: {
placeholder: 'הקלד פקודה או חפש...',
empty: 'לא נמצאו תוצאות.',
suggestions: 'הצעות',
calendar: 'לוח שנה',
searchEmoji: "חפש אמוג'י",
calculator: 'מחשבון',
settings: 'הגדרות',
profile: 'פרופיל',
billing: 'חיוב',
},
},
};
private readonly _translation = computed(() => this._translations[this._language()]);
protected readonly _t = computed(() => this._translation().values);
protected readonly _dir = computed(() => this._translation().dir);
}Brain API
BrnCommandEmpty
Selector: [brnCommandEmpty]
ExportAs: brnCommandEmpty
BrnCommandGroup
Selector: [brnCommandGroup]
ExportAs: brnCommandGroup
Inputs
| Prop | Type | Default | Description |
|---|---|---|---|
| id | string | `brn-command-group-${++BrnCommandGroup._id}` | The id of the command list |
BrnCommandInput
Selector: input[brnCommandInput]
ExportAs: brnCommandInput
Inputs
| Prop | Type | Default | Description |
|---|---|---|---|
| id | string | this._initialId | The id of the command input |
BrnCommandItem
Selector: button[brnCommandItem]
ExportAs: brnCommandItem
Inputs
| Prop | Type | Default | Description |
|---|---|---|---|
| id | string | `brn-command-item-${++BrnCommandItem._id}` | A unique id for the item |
| value* (required) | string | - | The value this item represents. |
| disabled | boolean | false | Whether the item is disabled. |
Outputs
| Prop | Type | Default | Description |
|---|---|---|---|
| selected | void | - | Emits when the item is selected. |
BrnCommandList
Selector: [brnCommandList]
ExportAs: brnCommandList
Inputs
| Prop | Type | Default | Description |
|---|---|---|---|
| id | string | `brn-command-list-${++BrnCommandList._id}` | The id of the command list |
| aria-label | string | undefined | undefined | Optional accessible name for the listbox. Usually not needed as the combobox names the widget. |
BrnCommandSeparator
Selector: [brnCommandSeparator]
ExportAs: brnCommandSeparator
BrnCommand
Selector: [brnCommand]
ExportAs: brnCommand
Inputs
| Prop | Type | Default | Description |
|---|---|---|---|
| id | string | `brn-command-${++BrnCommand._id}` | The id of the command |
| filter | CommandFilter | this._config.filter | A custom filter function to use when searching. |
| disabled | boolean | false | Whether the command is disabled |
| search | string | '' | The current search query. |
Outputs
| Prop | Type | Default | Description |
|---|---|---|---|
| valueChange | string | - | when the selection has changed |
| searchChange | string | '' | The current search query. |
Helm API
HlmCommandDialog
Selector: hlm-command-dialog
ExportAs: hlmCommandDialog
Inputs
| Prop | Type | Default | Description |
|---|---|---|---|
| title | string | 'Command Palette' | - |
| description | string | 'Search for a command to run...' | - |
| state | BrnDialogState | 'closed' | - |
| showCloseButton | boolean | false | - |
| dialogContentClass | ClassValue | '' | - |
Outputs
| Prop | Type | Default | Description |
|---|---|---|---|
| stateChange | BrnDialogState | - | - |
HlmCommandEmptyState
Selector: [hlmCommandEmptyState]
ExportAs: hlmCommandEmptyState
HlmCommandEmpty
Selector: [hlmCommandEmpty]
ExportAs: hlmCommandEmpty
HlmCommandGroupLabel
Selector: [hlmCommandGroupLabel],hlm-command-group-label
ExportAs: hlmCommandGroupLabel
HlmCommandGroup
Selector: [hlmCommandGroup],hlm-command-group
ExportAs: hlmCommandGroup
Inputs
| Prop | Type | Default | Description |
|---|---|---|---|
| id | string | `brn-command-group-${++BrnCommandGroup._id}` | The id of the command list |
HlmCommandInput
Selector: hlm-command-input
ExportAs: hlmCommandInput
Inputs
| Prop | Type | Default | Description |
|---|---|---|---|
| inputId | string | undefined | - | - |
| placeholder | string | '' | - |
HlmCommandItem
Selector: button[hlmCommandItem],button[hlm-command-item]
ExportAs: hlmCommandItem
Inputs
| Prop | Type | Default | Description |
|---|---|---|---|
| value* (required) | string | - | The value this item represents. |
| disabled | boolean | false | Whether the item is disabled. |
| id | string | `brn-command-item-${++BrnCommandItem._id}` | A unique id for the item |
Outputs
| Prop | Type | Default | Description |
|---|---|---|---|
| selected | void | - | Emits when the item is selected. |
HlmCommandList
Selector: [hlmCommandList],hlm-command-list
ExportAs: hlmCommandList
Inputs
| Prop | Type | Default | Description |
|---|---|---|---|
| id | string | `brn-command-list-${++BrnCommandList._id}` | The id of the command list |
HlmCommandSeparator
Selector: [hlmCommandSeparator],hlm-command-separator
ExportAs: hlmCommandSeparator
HlmCommandShortcut
Selector: [hlmCommandShortcut],hlm-command-shortcut
ExportAs: hlmCommandShortcut
HlmCommand
Selector: [hlmCommand],hlm-command
ExportAs: hlmCommand
Inputs
| Prop | Type | Default | Description |
|---|---|---|---|
| id | string | `brn-command-${++BrnCommand._id}` | The id of the command |
| filter | CommandFilter | this._config.filter | A custom filter function to use when searching. |
| search | string | '' | The current search query. |
| disabled | boolean | false | Whether the command is disabled |
Outputs
| Prop | Type | Default | Description |
|---|---|---|---|
| valueChange | string | - | when the selection has changed |
| searchChange | string | - | The current search query. |
On This Page