EXEPERTAI LAB

Research alpha

Time Machine
EXEPERTAI LAB
GALLERY / COLLECTION
← Browse Astryx gallery
CommandPalette·component·@astryxdesign/core

Command Palette Empty

Empty state display for the results area. Rendered automatically by CommandPalette for no-results and no-query states.

Open in Playground @astryxdesign/core/CommandPalette

Showcases and examples

2 documented examples

Command Palette Empty

Command palette empty state shown when no commands are available.

Preview loads on approachPreview loads on approach
Exact source · command-palette-empty-showcase
// Copyright (c) Meta Platforms, Inc. and affiliates.

'use client';

import {useMemo} from 'react';
import {CommandPalette} from '@astryxdesign/core/CommandPalette';
import {Text} from '@astryxdesign/core/Text';
import {createStaticSource} from '@astryxdesign/core/Typeahead';

export default function CommandPaletteEmptyShowcase() {
  const emptySource = useMemo(() => createStaticSource([]), []);

  return (
    <CommandPalette
      isOpen
      isInline
      onOpenChange={() => {}}
      searchSource={emptySource}
      emptyBootstrapText={
        <Text type="supporting" color="secondary">
          No commands available yet
        </Text>
      }
    />
  );
}

Usage

Empty state display for the results area. Rendered automatically by CommandPalette for no-results and no-query states.

Typed props

PropType and behavior
childrenReactNode · required
Message or content to display.