reopt design
DocsExploreTemplatesCanvasToolsPricing
Login
opt-uiopt-chartsopt-datagridopt-editoropt-calendaropt-filemanageropt-chatopt-shellbrandapp-ui
Overview205Core74Shells99Blocks32
CommandPaletteTrigger
reopt designreopt design

A design system for the AI era

  • Docs
  • Pricing
  • Releases
  • About
  • Contact
  • Terms of Service
  • Privacy Policy

reopt Inc.Business registration no. 217-88-02453contact@reopt.ai

© 2026 reopt Inc. All rights reserved.

CommandPaletteTrigger

Shell

Open CommandPalette with an automatically bound Cmd+K shortcut.

nav
Related docs
bun add @reopt-ai/opt-ui
Install and import
bash
bun add @reopt-ai/opt-ui
tsx
import { CommandPaletteTrigger } from "@reopt-ai/opt-ui";

Live preview

Change the width and theme, then interact with the components.

100%

사용법

이 컴포넌트는 전역 키보드 단축키(Cmd+K / Ctrl+K)를 자동으로 등록합니다. 앱 루트 레이아웃에 한 번만 배치하면 됩니다. 현재 페이지에서 Cmd+K를 눌러 직접 확인할 수 있습니다.

tsx
import { CommandPaletteTrigger } from "@reopt-ai/opt-ui";

const commands = [
  { id: "nav-home", label: "홈으로 이동", group: "네비게이션", shortcut: "G H" },
  { id: "nav-dashboard", label: "대시보드 열기", group: "네비게이션" },
  { id: "theme-dark", label: "다크 모드", group: "테마" },
];

// 앱 루트에 배치 — Cmd+K로 자동 열림
<CommandPaletteTrigger
  commands={commands}
  onSelect={(cmd) => console.log("선택:", cmd.label)}
/>

CommandPaletteTrigger

PropTypeDefaultDescription
commandsRequiredOmit<CommandDef, "action">[]—커맨드 목록
onSelect(command: Omit<CommandDef, "action">) => void—커맨드 선택 핸들러
labelsCommandPaletteTriggerLabels—내부 CommandPalette에 전달할 title/input/list 문구

컴포넌트 의존 관계

깊이
▼ USES (1)CommandPaletteTriggercommand-palette
View test results

테스트 커버리지

2026년 7월 9일5/5 통과
5성공
0실패
5전체
  • 기본 상태에서 dialog가 닫혀있다
  • Cmd+K로 palette를 연다
  • Ctrl+K로 palette를 연다
  • onSelect 콜백을 전달한다
  • labels를 palette dialog와 input에 전달한다

Related components

opt-ui

CommandPalette

Shells

Find commands with a Cmd+K-style palette combining Dialog, Combobox, and fuzzy search.

opt-ui

ContentTabs

Shells

Switch between content panels with a wrapper around the Tabs primitive.

opt-ui

SidebarNav

Shells

Navigate a sidebar with Composite keyboard support and automatic pathname synchronization.

opt-ui

AppMenubar

Shells

Use a desktop-style menu bar with checkbox and radio menu items.

opt-ui

ProjectSwitcher

Shells

Search and switch projects with a fuzzy-search combobox.

opt-ui

Sidebar

Shells

Compose collapsible navigation with header, content, footer, groups, and items, plus a Ctrl+[ shortcut.

PreviousCommandPaletteNextDeploymentTimeline