Oddmash UI
すべてのコンポーネント

コマンドパレット

操作を検索して実行します。

使い方

明示的なトリガー、または任意の Mod+K ショートカットで開きます。説明付きのグループ結果と必要に応じた検索フィルターを渡します。

アクセシビリティ

矢印キー、Enter、Escape を使用します。明確な結果名と説明を提供します。

プロパティ型既定値
itemsreadonly CommandPaletteItem[]Required
open / defaultOpenbooleanfalse
onOpenChange(open: boolean) => voidNone
shortcutbooleanfalse
dismissLabelstringNone
maxResultsnumberAll
filter(item, query) => booleanDefault matching
<CommandPalette
  trigger={<Button>Commands</Button>}
  title="Commands"
  description="Choose an action"
  searchLabel="Search commands"
  emptyLabel="No commands found"
  dismissLabel="Close commands"
  items={[
    { id: 'save', label: 'Save project', group: 'Project', description: 'Save current changes', onSelect: () => {} },
    { id: 'guide', label: 'Usage guide', group: 'Documentation', onSelect: () => {} },
  ]}
/>

インタラクティブなドキュメント