Skip to content
WingoUI
ComponentsTemplatesDocsPricingAI agentsBlogChangelogContact
Components
Buttons & Actions
ButtonButton GroupCopy ButtonDelete ButtonTheme ToggleToggleToggle Group
Inputs
Avatar UploadCalendarCheckboxColor PickerComboboxCountry SelectCron PickerCurrency InputDate PickerDate Range PickerDate Time PickerDuration PickerEmail InputEmoji PickerFile UploadFilter BuilderInputInput GroupListboxMasked InputMention InputMonth PickerMulti SelectNumber InputOTP InputPassword InputPhone InputRadio GroupRatingSearch InputSegmented ControlSelectSignature PadSliderSwitchTag InputTextareaTime PickerTimezone SelectTree Select
Forms
Address InputBooking WidgetCSV ImportFieldForm WizardInline EditInvoice line itemsRich Text EditorSchema Builder
Navigation
Back To TopBounce SidebarBreadcrumbCommand MenuGlobal SearchGooey NavHook SidebarNav MenuNav TabsPaginationProximity SidebarScroll ProgressSidebarStepsTable Of ContentsTabsTopbarUser MenuWorkspace Switcher
Overlays
Alert DialogContext MenuDialogDrawerDropdown MenuFamily DrawerHover CardPopoverShare DialogSheetShortcuts DialogTooltipTour
Feedback
AlertBannerCookie ConsentEmoji ReactionEmpty StateNotification BellNotification CenterProgressRoute ProgressSetup ChecklistSkeletonSpinnerToast
Data Display
Approval FlowAvatarBadgeCalendar ViewCode BlockComment ThreadContact cardCountdownDescription ListDiff ViewerFile ListFile managerFolderGanttJSON ViewerKbdLog ViewerMarkdownPresenceSchedulerTagTimelineTree View
Tables & Lists
Audit LogData TableDeal PipelineEditable GridKanbanListMembers tablePermissions MatrixTableTask ListVirtual List
Charts & Stats
Animated CounterArea chartBar chartDonut chartFunnel chartGaugeGitHub ActivityHeatmap calendarLeaderboardLine chartRadar chartRadial barSparklineStat CardTrackerTrend badge
Layout
AccordionApp ShellCardCollapsibleDetail LayoutEntity HeaderPage HeaderScroll AreaSeparatorSettings LayoutSplit ViewToolbar
Media
Audio PlayerCarouselCSV ViewerDOCX EditorDOCX ViewerExcel ViewerFile SystemImage compareImage CropperImage GalleryImage LightboxLocation MapPDF ViewerPowerPoint ViewerQR CodeStep PlayerVideo Player
AI Kit
Agent Status CardChat MessageChat ThreadChat WidgetConversation ListFluid OrbGrid RevealMatrix OrbModel PickerPrompt InputReasoning IndicatorRule BuilderSuggestion ChipsTool Call TimelineUsage MeterVoice InputWorkflow Canvas
Text & Effects
Background PatternGravity LettersMarqueeTerminalText AnimateText Rotate
Mobile
Action SheetBottom Tab BarFABHaptic ButtonHero HeaderInstall PromptLarge Title HeaderNotification BannerOnboarding CarouselPicker WheelPull To RefreshSlide To ConfirmSticky CTA BarSwipe DeckSwipeable Tabs
Commerce
Cart drawerCategory pickerCheckout stepsCoupon inputFavorite buttonFilter panelListing cardListing gridOrder trackerPricePrice rangePricing tableProduct galleryQuantity stepperReviewsSeller card
Marketing Sections
App Download SectionBlog Cards SectionCTA SectionFAQ SectionFeature GridFeature ShowcaseHero SectionIntegrations SectionLogo CloudMarketing FooterMarketing HeaderMarketing SectionNewsletter SectionPricing SectionStats SectionSteps SectionTeam SectionTestimonials SectionTimeline SectionVideo Section
Blocks
Admin Dashboard PageAdmin ShellAI Chat PageAPI Keys PageAutomation Builder PageCheckout PageCRM Contact PageCRM Pipeline PageError PagesInbox PageInvoice PageKPI DashboardListing Detail PageLogin PageMarketplace Home PageMarketplace Search PageMarketplace ShellMobile App HomeOnboarding FlowOrder History PagePost Listing WizardPricing PageProfile PageRegister PageSettings PageUsers Admin Page
Templates
About PageAcademy PageAccessibility PageAffiliate PageAgency PageAI Product PageAppointment Booking PageBlog PageBlog Post PageBug Bounty PageCareers PageChangelog PageCommunity PageCompare PageContact PageCustomer Story PageCustomers PageDemo Booking PageDevelopers PageDocs Home PageDownload PageEnterprise PageEvents PageExperts PageFAQ PageFeature PageGlossary PageHelp Article PageHelp Center PageHome Services PageImpact PageIntegration Detail PageIntegrations PageJob Detail PageLanding PageLaunch PageLegal PageManifesto PagePortfolio PagePress PageProduct Tour PagePromo PageReal Estate PageReferral PageResearch Report PageRestaurant PageRoadmap PageROI Calculator PageSecurity PageSolutions PageStartups PageStatus PageStorefront PageSwitch PageTemplate Gallery PageTravel PageWaitlist PageYear in Review Page
Hooks & Utilities
AI ChatChart kitCommerceDate utilsFile exportFile typesFiltersForm validationHapticsInvoicingMotion presetsNavigationNumber formatRelative timeRomanian locationsSpreadsheetText matchTonesUIProvideruseClipboarduseConsentuseControllableStateuseCooldownuseDebounceuseKeyboardInsetuseLocaleuseLongPressuseMediaControlsuseMediaQueryuseOverflowItemsusePersistedStateuseScrollEdgesuseScrollStateuseSelectionuseShortcutuseStickToBottom
GalleryTheme

Overlays

Shortcuts Dialog

Overlays

Shortcuts Dialog React component for Tailwind CSS v4

SheetTooltip
Live props
Content
title
description
searchPlaceholder
emptyText
thenLabel
orLabel
closeLabel
clearLabel
Appearance
size
radius
platform
kbdVariant
kbdSize
Layout
columns2
State
defaultOpen
Behavior
shortcut
search
responsive
Code
import { ShortcutsDialog } from "@/components/ui/shortcuts-dialog"

<ShortcutsDialog />
  1. Home
  2. Components
  3. Overlays
  4. Shortcuts Dialog
Pro

Shortcuts Dialog React component for Tailwind CSS v4

v1.0.0·Added in 1.0.0

A React keyboard shortcuts dialog, the "?" overlay of keyboard-friendly apps: every shortcut grouped and searchable, in the device's notation.

Press ? anywhere (not while typing) and the dialog springs in with every shortcut grouped in two columns; press it again to close. Keys show as ⌘ ⇧ glyphs on a Mac and Ctrl / Shift words elsewhere, alternatives read "⌘ K or /" and sequences "G then I". With a mouse or trackpad the search takes focus at once: type a word, a key ("ctrl", "shift", "⌘") or a group name and the rows narrow instantly with the matching letters underlined, groups without matches disappear and an empty state fades in when nothing is left; the card keeps its height while you search, so nothing jumps. Esc clears the search first, then closes; Tab moves between the search, the clear button and the close button. On a phone it is a tall bottom sheet in one column with the search pinned under the title (it keeps its height while you filter), opened from a trigger such as a help menu entry; swipe it down or tap outside to close, and the keyboard only appears when you tap the search.

Shortcuts Dialog is a Pro React component in the React overlay components category, written in TypeScript for React 19 and Tailwind CSS v4. It installs as source with npx wingo-ui@latest add shortcuts-dialog, together with UIProvider, Dialog, Input, Kbd, useControllableState and 4 more and the npm packages motion and lucide-react.

Add to a project

Requirements: React 19 and Tailwind CSS v4, in Next.js (App Router or Pages), Vite or React Router. Installation guide · Next.js setup · Vite setup

npx wingo-ui@latest add shortcuts-dialog

Shortcuts Dialog is part of Pro, with 298 more Pro items: $8 a month or $150 once. 14-day refund before you download any Pro item. See plans

Usage

Import ShortcutsDialog from @/components/ui/shortcuts-dialog.

import { Keyboard } from "lucide-react"
import { Button } from "@/components/ui/button"
import { Kbd } from "@/components/ui/kbd"
import { ShortcutsDialog, type ShortcutGroup } from "@/components/ui/shortcuts-dialog"

const groups: ShortcutGroup[] = [
  {
    label: "General",
    items: [
      { label: "Search", shortcut: ["mod+k", "/"] },
      { label: "Shortcuts", shortcut: "?" },
      { label: "Toggle sidebar", shortcut: "mod+b" },
    ],
  },
  {
    label: "Navigation",
    items: [
      { label: "Go to Inbox", shortcut: ["g", "i"], sequence: true },
      { label: "Go to Clients", shortcut: ["g", "c"], sequence: true },
    ],
  },
  {
    label: "Invoices",
    items: [
      { label: "New invoice", shortcut: "f", keywords: ["issue"] },
      { label: "Send by email", shortcut: "mod+enter" },
      { label: "Download PDF", shortcut: "shift+mod+d" },
    ],
  },
]

export function HelpShortcuts() {
  return (
    <ShortcutsDialog
      groups={groups}
      title="Keyboard shortcuts"
      hint={
        <span className="inline-flex items-center gap-1.5">
          Press <Kbd shortcut="?" size="sm" /> any time to open the list
        </span>
      }
      trigger={
        <Button variant="soft" size="sm" leftIcon={<Keyboard />}>
          Shortcuts
        </Button>
      }
    />
  )
}

Props

  • groupsdefault "[]"
    ShortcutGroup[]

    { id?, label?: ReactNode, textValue?, items: ShortcutEntry[] }. An entry is { id?, label: ReactNode, shortcut: string | string[], description?: ReactNode, sequence?: boolean, keywords?: string[], textValue?: string }. Shortcuts use mod+k notation; an array is alternatives ("mod+k" or "/"), or the keys of a sequence when sequence is true (["g", "i"]). An unparseable shortcut shows its raw text in one cap. Empty groups are hidden.

  • titledefault "Keyboard shortcuts"
    ReactNode

    The dialog title. "" keeps it for screen readers only.

  • descriptiondefault ""
    ReactNode

    A muted line under the title.

  • searchPlaceholderdefault "Search shortcuts"
    string

    The search field's placeholder and accessible name.

  • emptyTextdefault "No shortcuts found"
    ReactNode

    Shown when nothing matches the search.

  • thenLabeldefault "then"
    string

    Between the keys of a sequence ("G then I"). Screen readers read it too.

  • orLabeldefault "or"
    string

    Between alternatives ("⌘ K or /").

  • closeLabeldefault "Close"
    string

    aria-label of the close button.

  • clearLabeldefault "Clear"
    string

    aria-label of the search's clear button.

  • hint
    ReactNode

    The footer line. Default: "Press ? anytime to see this list" with the bound key as a cap, hidden on touch screens; null hides it. Pass a translated node for localized apps.

  • sizedefault "lg"
    "md" | "lg" | "xl"

    The dialog's max width: 520 / 720 / 960px. On phones the sheet with a search is 92% tall, so filtering never resizes it; without a search it fits its content.

  • radiusdefault "lg"
    "none" | "sm" | "md" | "lg"

    Corner shape of the card (sm 12px, md 16px, lg 24px) and of the phone sheet's top corners.

  • platformdefault "auto"
    "auto" | "apple" | "other"

    The key notation: apple shows ⌘ ⇧ ⌥ glyphs, other Ctrl / Shift / Alt words. auto renders the other form on the server, then the device's.

  • kbdVariantdefault "soft"
    "soft" | "outline" | "solid"

    The key cap look: the quiet gray key, a bordered key or a raised physical key.

  • kbdSizedefault "sm"
    "sm" | "md"

    Key cap height, 16 or 20px.

  • columnsdefault 2
    1 | 2

    Groups side by side from 768px. Phones always get one column.

  • defaultOpendefault false
    boolean

    Starts open while uncontrolled.

  • open
    boolean

    Controlled open state; pair it with onOpenChange (e.g. to open it from a help menu entry).

  • onOpenChange
    (open: boolean) => void

    Called when it opens or closes (trigger, shortcut, Esc, outside click, swipe).

  • shortcutdefault "?"
    string

    Opens and closes it from anywhere, in mod+k notation. Keys without a modifier never fire while typing, so "?" in the search types a "?". "" binds nothing. The showcase itself listens for ?, so the demo binds ⌘/ in its place.

  • searchdefault true
    boolean

    A filter field above the groups. It matches labels, keywords, descriptions and the shortcut in both notations, ignoring case and diacritics; it takes focus on open only with a mouse or trackpad.

  • responsivedefault true
    boolean

    A bottom sheet below 768px (one column, search pinned). false keeps the centered card on phones.

  • trigger
    ReactNode

    The element that opens it, rendered with asChild (a single element that takes a ref); it gets aria-keyshortcuts.

  • container
    HTMLElement | null

    Portal target, document.body by default.

  • classNames
    Partial<Record<"content" | "header" | "search" | "groups" | "group" | "groupLabel" | "row" | "label" | "description" | "keys" | "then" | "or" | "mark" | "empty" | "hint", string>>

    Extra classes for the inner parts.

  • className
    string

    Extra classes for the dialog card (or the sheet), merged last. Other props (aria-*, data-*, style, onOpenAutoFocus, onEscapeKeyDown, ref) go to the same element.

Examples

Apple and other notation

platform="apple" shows ⌘ ⇧ glyphs, "other" spells Ctrl and Shift; auto picks by device.

Small cheat sheet

One column, no search, a medium dialog for a single screen's keys.

Descriptions on rows

A muted line under a label explains what the key does; a custom hint in the footer.

Phone sheet

What it becomes below 768px (a static replica of the sheet).

From a user menu

Controlled open: a menu entry opens it, the way touch-only people reach it.

Outline keys, extra large

kbdVariant="outline", kbdSize="md", size="xl", radius="md", and the Ctrl notation forced.

Dependencies

motionlucide-reactui-configdialoginputkbduse-controllable-stateuse-media-queryuse-shortcutmotiontext-match

Files

  • components/ui/shortcuts-dialog.tsx

FAQ

Is the React Shortcuts Dialog component free?

The preview, props and docs are free; copying the source needs a Pro plan. See plans.

How do I install Shortcuts Dialog?

Run npx wingo-ui@latest add shortcuts-dialog. It also adds the Wingo UI items it builds on (UIProvider, Dialog, Input, Kbd, useControllableState and 4 more) and the npm packages motion and lucide-react. With shadcn, add the @wingo-ui registry with your API key, then run npx shadcn@latest add @wingo-ui/shortcuts-dialog.

How does Shortcuts Dialog behave on phones?

A bottom sheet below 768px (one column, search pinned). false keeps the centered card on phones. The responsive prop controls this and is on by default.

See also

KbdDialoguseShortcuthookCommand MenuSheet

More React overlay components

TourTooltipDropdown MenuAlert DialogContext MenuDrawer
All 13 React overlay components
PreviousSheetNext Tooltip
A

Acme CRM

North Workshop LLC · Pro

Most used

SearchCtrlKControl Kor/Slash
Go to InboxGGthenII
Send by emailCtrlEnterControl Enter

Press Ctrl/Control Slash or tap Shortcuts to open it. The showcase already uses ?, so this demo binds the combo instead. Type to filter, Esc clears the search, then closes.Tap Shortcuts to open it as a bottom sheet, type to filter, swipe down to close.

notation auto · phone sheet · close “Close” · clear “Clear”