EXEPERTAI LAB

Research alpha

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

Command Palette List

Scrollable results container. Renders as a listbox for ARIA. Contains CommandPaletteItem and CommandPaletteGroup children.

Open in Playground @astryxdesign/core/CommandPalette

Showcases and examples

2 documented examples

Command Palette List

Scrollable command palette list with grouped items, including a highlighted item, composed without a full CommandPalette.

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

'use client';

import {
  CommandPaletteList,
  CommandPaletteGroup,
  CommandPaletteItem,
} from '@astryxdesign/core/CommandPalette';

export default function CommandPaletteListShowcase() {
  return (
    <CommandPaletteList>
      <CommandPaletteGroup heading="Navigation">
        <CommandPaletteItem value="home" onSelect={() => {}}>
          Go Home
        </CommandPaletteItem>
        <CommandPaletteItem value="settings" onSelect={() => {}}>
          Open Settings
        </CommandPaletteItem>
        <CommandPaletteItem value="profile" onSelect={() => {}}>
          View Profile
        </CommandPaletteItem>
      </CommandPaletteGroup>
      <CommandPaletteGroup heading="Actions">
        <CommandPaletteItem value="new-file" onSelect={() => {}}>
          New File
        </CommandPaletteItem>
        <CommandPaletteItem value="search" isHighlighted onSelect={() => {}}>
          Search Files
        </CommandPaletteItem>
        <CommandPaletteItem value="save" onSelect={() => {}}>
          Save All
        </CommandPaletteItem>
      </CommandPaletteGroup>
    </CommandPaletteList>
  );
}

Usage

Scrollable results container. Renders as a listbox for ARIA. Contains CommandPaletteItem and CommandPaletteGroup children.

Typed props

PropType and behavior
childrenReactNode · required
Items, groups, and empty states.
labelstring · default 'Commands'
Accessible label for the listbox.
xstyleStyleXStyles
StyleX styles for layout customization. Must be a stylex.create() value.