Logo

Component Blueprint

X: 1280 · Y: 720 · Grid: 8px

Command

Searchable command menus and command palettes for quick actions.

01 Hero Preview

Grid: 8px · Scale: 1:1

Suggested

02 Usage

TS

import { FrCommandModule, FrCommandService } from '@frame-ui-ng/components/command';

HTML

<section frCommand class="command-demo">
  <input frCommandInput placeholder="Type a command or search..." />
  <div frCommandList>
    <p frCommandEmpty>No results found.</p>
    <div frCommandGroup heading="Suggestions">
      <p frCommandGroupHeading>Suggestions</p>
      <button frCommandItem value="calendar" label="Calendar">Calendar</button>
      <button frCommandItem value="emoji" label="Search Emoji">Search Emoji</button>
      <button frCommandItem value="calculator" label="Calculator" keywords="math,numbers">
        Calculator
      </button>
    </div>
    <div frCommandSeparator></div>
    <div frCommandGroup heading="Settings">
      <p frCommandGroupHeading>Settings</p>
      <button frCommandItem value="profile" label="Profile">
        <span>Profile</span>
        <span frCommandShortcut>⌘P</span>
      </button>
      <button frCommandItem value="billing" label="Billing">
        <span>Billing</span>
        <span frCommandShortcut>⌘B</span>
      </button>
    </div>
  </div>
  <div frCommandFooter>
    <span><kbd>↑↓</kbd> to navigate</span>
    <span><kbd>↵</kbd> to select</span>
    <span><kbd>esc</kbd> to close</span>
  </div>
</section>

03 Examples

Basic

A searchable command menu with groups, empty state, separators, and shortcuts.

Component Sheet

Grid: 8px · Scale: 1:1

Suggested

Dialog

Open a command menu from the template with FrCommandDialog and FrCommandDialogTrigger.

Component Sheet

Grid: 8px · Scale: 1:1

Programmatic

Inject FrCommandService and open a command menu component directly from code.

Component Sheet

Grid: 8px · Scale: 1:1

Shortcuts

Use FrCommandShortcut for display-only keyboard shortcut hints.

Component Sheet

Grid: 8px · Scale: 1:1

Groups

Group related commands, add icons, and separate sections with FrCommandSeparator.

Component Sheet

Grid: 8px · Scale: 1:1

Scrollable

Limit the command list height to keep long menus usable.

Component Sheet

Grid: 8px · Scale: 1:1

RTL support

Command uses logical spacing, so items, shortcuts, groups, and icons adapt in RTL.

Component Sheet

Grid: 8px · Scale: 1:1

اقتراحات

الإعدادات

04 Custom Styling

Override command tokens locally to tune the surface, list height, item highlight treatment, or dialog presentation.

Component Sheet

Grid: 8px · Scale: 1:1

Suggested

05 Token Inspector

Inspect the command shell, input, list, group, item, footer, and shortcut tokens.

Suggestions

Settings

06 Design Tokens

Use these CSS custom properties to tune command surfaces, search input, groups, items, shortcuts, separators, and dialog overlays.

SCSS


  --frame-command-bg: var(--frame-surface);
  --frame-command-color: var(--frame-surface-foreground);
  --frame-command-border: var(--frame-border);
  --frame-command-radius: var(--frame-radius-lg);
  --frame-command-shadow: var(--frame-shadow-sm);
  --frame-command-input-height: 3.25rem;
  --frame-command-input-radius: var(--frame-radius-md);
  --frame-command-list-max-height: 20rem;
  --frame-command-item-height: 2.5rem;
  --frame-command-item-highlighted-bg: var(--frame-accent);
  --frame-command-item-highlighted-color: var(--frame-accent-foreground);
  --frame-command-shortcut-color: var(--frame-muted-foreground);
  --frame-command-backdrop-bg: rgb(0 0 0 / 0.42);