@@ -6,6 +6,8 @@ import { NPMX_DOCS_SITE } from '#shared/utils/constants'
66
77const keyboardShortcuts = useKeyboardShortcuts ()
88const discord = useDiscordLink ()
9+ const { open : openCommandPalette } = useCommandPalette ()
10+ const { commandPaletteShortcutLabel } = usePlatformModifierKey ()
911
1012withDefaults (
1113 defineProps <{
@@ -258,6 +260,20 @@ onKeyStroke(
258260 <!-- Spacer when logo is hidden on desktop -->
259261 <span v-else class =" hidden sm:block w-1" />
260262
263+ <ButtonBase
264+ type =" button"
265+ variant =" secondary"
266+ class =" hidden lg:inline-flex shrink-0 gap-2 px-2.5 me-3"
267+ :aria-label =" $t('shortcuts.command_palette')"
268+ :title =" $t('shortcuts.command_palette_description')"
269+ @click =" openCommandPalette"
270+ >
271+ <span >{{ $t('command_palette.quick_actions') }}</span >
272+ <span class =" inline-flex items-center gap-1 text-xs text-fg-subtle" >
273+ <kbd class =" header-kbd" >{{ commandPaletteShortcutLabel }}</kbd >
274+ </span >
275+ </ButtonBase >
276+
261277 <!-- Center: Search bar + nav items -->
262278 <div
263279 class =" flex-1 flex items-center md:gap-6"
@@ -293,7 +309,7 @@ onKeyStroke(
293309 </div >
294310
295311 <!-- End: Desktop nav items + Mobile menu button -->
296- <div class =" hidden sm:flex flex-shrink-0" >
312+ <div class =" hidden sm:flex flex-shrink-0 items-center gap-2 " >
297313 <!-- Desktop: Explore link -->
298314 <LinkBase
299315 v-for =" link in desktopLinks"
@@ -335,3 +351,9 @@ onKeyStroke(
335351 <HeaderMobileMenu :links =" mobileLinks" v-model:open =" showMobileMenu" />
336352 </header >
337353</template >
354+
355+ <style scoped>
356+ .header-kbd {
357+ @apply inline-flex items-center justify-center rounded border border-border bg-bg-muted px- 1.5 py- 0.5 font-mono text- [0.7rem ] text-fg-muted ;
358+ }
359+ </style >
0 commit comments