# @askrjs/themes/command

> Published API exports for @askrjs/themes/command.

Source: [https://askrjs.com/docs/reference/api/themes/command](https://askrjs.com/docs/reference/api/themes/command)

Status: stable. Packages: @askrjs/themes/command.

**Published packages are authoritative.** Examples may lag behind a published contract. When guidance differs, verify the exports and TypeScript declarations in your installed package, then file an issue.

## Exports

This entrypoint publishes 22 exports from the declarations shipped by @askrjs/themes.

### `Command`

```ts
Command: (props: CatalogComponentProps) => JSX.Element
```

Styling-only command anatomy; it does not own filtering, selection, focus, or keyboard commands.

### `CommandDialog`

```ts
CommandDialog: (props: CatalogComponentProps) => JSX.Element
```

Renders the `command-dialog` part of the shadcn-compatible catalog primitives.

### `CommandEmpty`

```ts
CommandEmpty: (props: CatalogComponentProps) => JSX.Element
```

Renders the `command-empty` part of the shadcn-compatible catalog primitives.

### `CommandGroup`

```ts
CommandGroup: (props: CatalogComponentProps) => JSX.Element
```

Renders the `command-group` part of the shadcn-compatible catalog primitives.

### `CommandGroupHeading`

```ts
CommandGroupHeading: (props: CatalogComponentProps) => JSX.Element
```

Renders the `command-group-heading` part of the shadcn-compatible catalog primitives.

### `CommandHeader`

```ts
CommandHeader: (props: CatalogComponentProps) => JSX.Element
```

Renders the `command-header` part of the shadcn-compatible catalog primitives.

### `CommandInput`

```ts
CommandInput: (props: CatalogComponentProps<HTMLInputElement>) => JSX.Element
```

Renders the command palette's search `<input>`.

### `CommandItem`

```ts
CommandItem: (props: CatalogComponentProps & { active?: boolean; disabled?: boolean; selected?: boolean; }) => JSX.Element
```

Renders a selectable command list entry, exposing `active`/`disabled`/`selected` as ARIA and data attributes.

### `CommandList`

```ts
CommandList: (props: CatalogComponentProps) => JSX.Element
```

Renders the `command-list` part of the shadcn-compatible catalog primitives.

### `CommandPalette`

```ts
CommandPalette: (props: CommandPaletteProps) => JSX.Element
```

Root dialog wrapper for a searchable command palette. Manages open state
(controlled or uncontrolled), tracks the triggering element, and restores
focus to it after the palette closes.

### `CommandPaletteContent`

```ts
CommandPaletteContent: (props: CommandPaletteContentProps) => JSX.Element
```

Dialog content for a {@link CommandPalette}: renders the overlay, an
accessible (visually hidden) title/description, and a `Command` list,
moving initial focus to `initialFocus` (defaults to the search input) once
mounted, and optionally suppressing dismiss-on-escape/backdrop.

### `CommandPaletteContentProps`

```ts
CommandPaletteContentProps: Omit<DialogContentProps, "children" | "title" | "onEscapeKeyDown" | "onInteractOutside" | "onPointerDownOutside"> & {
  children?: unknown;
  title: string;
  description?: string;
  initialFocus?: string | (() => HTMLElement | null) | false;
  closeOnBackdrop?: boolean;
  closeOnEscape?: boolean;
  overlayProps?: DialogOverlayProps;
  onEscapeKeyDown?: (event: KeyboardEvent) => void;
  onInteractOutside?: (event: Event) => void;
  onPointerDownOutside?: (event: PointerEvent) => void;
}
```

Props for the {@link CommandPaletteContent } component.

- `children`: children?: unknown;

- `closeOnBackdrop`: closeOnBackdrop?: boolean | undefined;

- `closeOnEscape`: closeOnEscape?: boolean | undefined;

- `description`: description?: string | undefined;

- `initialFocus`: initialFocus?: string | false | (() => HTMLElement | null) | undefined;

- `onEscapeKeyDown`: onEscapeKeyDown?: ((event: KeyboardEvent) => void) | undefined;

- `onInteractOutside`: onInteractOutside?: ((event: Event) => void) | undefined;

- `onPointerDownOutside`: onPointerDownOutside?: ((event: PointerEvent) => void) | undefined;

- `overlayProps`: overlayProps?: DialogOverlayProps | undefined;

- `title`: title: string;

### `CommandPaletteLink`

```ts
CommandPaletteLink: (props: CommandPaletteLinkProps) => JSX.Element
```

A navigable result row that closes the palette on selection (unless `closeOnSelect` is `false`) and supports cancelling navigation via `onBeforeNavigate`.

### `CommandPaletteLinkProps`

```ts
CommandPaletteLinkProps: LinkProps & {
  closeOnSelect?: boolean;
  onBeforeNavigate?: (event: Event) => void;
}
```

Props for the {@link CommandPaletteLink } component.

- `closeOnSelect`: closeOnSelect?: boolean | undefined;

- `onBeforeNavigate`: onBeforeNavigate?: ((event: Event) => void) | undefined;

### `CommandPaletteList`

```ts
CommandPaletteList: (props: CommandPaletteListProps) => JSX.Element
```

Renders the `<ul>` list wrapper for {@link CommandPalette} results.

### `CommandPaletteListProps`

```ts
CommandPaletteListProps: Omit<JSX.IntrinsicElements["ul"], "children" | "ref"> & {
  children?: unknown;
  ref?: Ref<HTMLUListElement>;
}
```

Props for the {@link CommandPaletteList } component.

- `children`: children?: unknown;

- `ref`: ref?: Ref<HTMLUListElement>;

### `CommandPaletteProps`

```ts
CommandPaletteProps: DialogProps
```

Props for the {@link CommandPalette } component.

### `CommandPaletteTrigger`

```ts
CommandPaletteTrigger: { (props: CommandPaletteTriggerProps): JSX.Element; (props: CommandPaletteTriggerAsChildProps): JSX.Element; }
```

Trigger that opens the {@link CommandPalette}, registering itself so focus returns here on close.

### `CommandPaletteTriggerAsChildProps`

```ts
CommandPaletteTriggerAsChildProps: DialogTriggerAsChildProps
```

Props for {@link CommandPaletteTrigger } rendered with `asChild`.

### `CommandPaletteTriggerProps`

```ts
CommandPaletteTriggerProps: DialogTriggerProps
```

Props for the {@link CommandPaletteTrigger } component.

### `CommandSeparator`

```ts
CommandSeparator: (props: CatalogComponentProps) => JSX.Element
```

Renders the `command-separator` part of the shadcn-compatible catalog primitives.

### `CommandShortcut`

```ts
CommandShortcut: (props: CatalogComponentProps) => JSX.Element
```

Renders the `command-shortcut` part of the shadcn-compatible catalog primitives.

## Documentation navigation

[Previous](https://askrjs.com/docs/reference/api/themes/combobox/index.md) | [Next](https://askrjs.com/docs/reference/api/themes/container/index.md)
