メインコンテンツへスキップ
ホーム/コンポーネント/オーバーレイ/コマンドパレット

CommandPalette

コマンドパレット(⌘K)。検索 + アクション実行の統合 UI。

import { CommandPalette } from "@blueai/ui"

Examples

Basic

Props

PropTypeDefaultDescription
open*boolean表示状態
onClose*() => void閉じるハンドラ
sections*CommandSection[]コマンドセクション { label, items }
placeholderstring"コマンドを検索..."検索欄のプレースホルダー

Types

CommandSection

type CommandSection = {
  label: string;
  items: CommandItem[];
};

CommandItem

type CommandItem = {
  id: string;
  label: string;
  icon?: ReactNode;
  hint?: string;
  shortcut?: string;
  onSelect: () => void;
};