명령 팔레트
작업을 찾아 실행합니다.
사용법
명시적인 트리거 또는 선택적으로 Mod+K 단축키로 열 수 있습니다. 설명이 있는 그룹 결과와 필요시 자체 검색 필터를 전달하세요.
접근성
화살표 키, Enter, Escape를 사용하세요. 명확한 결과 이름과 설명을 제공하세요.
| 속성 | 타입 | 기본값 |
|---|---|---|
| items | readonly CommandPaletteItem[] | Required |
| open / defaultOpen | boolean | false |
| onOpenChange | (open: boolean) => void | None |
| shortcut | boolean | false |
| dismissLabel | string | None |
| maxResults | number | All |
| filter | (item, query) => boolean | Default 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: () => {} },
]}
/>