Askr documentation
Generated API snapshot

@askrjs/themes/command

Exports from the declarations published in @askrjs/themes. Signatures reflect the published artifact.

Exports

This entrypoint publishes 22 exports. Use the anchored symbol rows for direct links. Type-only exports are labeled separately from runtime values.

Commandtype

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

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

CommandDialogtype

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

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

CommandEmptytype

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

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

CommandGrouptype

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

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

CommandGroupHeadingtype

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

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

CommandHeadertype

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

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

CommandInputtype

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

Renders the command palette's search <input>.

CommandItemtype

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.

CommandListtype

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

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

CommandPalettetype

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.

CommandPaletteContenttype

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.

CommandPaletteContentPropstype

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;

CommandPaletteListtype

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

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

CommandPaletteListPropstype

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>;

CommandPalettePropstype

CommandPaletteProps: DialogProps

Props for the {@link CommandPalette } component.

CommandPaletteTriggertype

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

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

CommandPaletteTriggerPropstype

CommandPaletteTriggerProps: DialogTriggerProps

Props for the {@link CommandPaletteTrigger } component.

CommandSeparatortype

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

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

CommandShortcuttype

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

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