TanStack Hotkeys ships devtools for debugging and monitoring your registered hotkeys in real time, as a panel inside the TanStack Devtools multi-panel UI.
Note
By default, TanStack Devtools and the Hotkeys devtools are only included in development mode, so they add nothing to your production bundle. If you need devtools in a production build (say, to debug a production-only issue), use the alternative "production" imports.
The Hotkeys devtools panel lets you:
Install the devtools packages for your framework:
npm install @tanstack/react-devtools @tanstack/react-hotkeys-devtoolsnpm install @tanstack/preact-devtools @tanstack/preact-hotkeys-devtoolsnpm install @tanstack/solid-devtools @tanstack/solid-hotkeys-devtoolsnpm install @tanstack/vue-hotkeys-devtoolsAngular and Lit do not currently ship a dedicated hotkeys devtools adapter.
import { TanStackDevtools } from '@tanstack/react-devtools'
import { hotkeysDevtoolsPlugin } from '@tanstack/react-hotkeys-devtools'
function App() {
return <TanStackDevtools plugins={[hotkeysDevtoolsPlugin()]} />
}import { TanStackDevtools } from '@tanstack/preact-devtools'
import { hotkeysDevtoolsPlugin } from '@tanstack/preact-hotkeys-devtools'
export function App() {
return <TanStackDevtools plugins={[hotkeysDevtoolsPlugin()]} />
}import { TanStackDevtools } from '@tanstack/solid-devtools'
import { hotkeysDevtoolsPlugin } from '@tanstack/solid-hotkeys-devtools'
export function App() {
return <TanStackDevtools plugins={[hotkeysDevtoolsPlugin()]} />
}<script setup lang="ts">
import { HotkeysDevtoolsPanel } from '@tanstack/vue-hotkeys-devtools'
</script>
<template>
<AppContent />
<HotkeysDevtoolsPanel />
</template>For React, Preact, and Solid, the Hotkeys panel appears alongside any other TanStack devtools plugins you have installed.
React, Preact, and Solid also export HotkeysDevtoolsPanel for rendering without the TanStack Devtools dock:
import { HotkeysDevtoolsPanel } from '@tanstack/react-hotkeys-devtools'
function DebugPanel() {
return <HotkeysDevtoolsPanel />
}Use the corresponding @tanstack/preact-hotkeys-devtools or @tanstack/solid-hotkeys-devtools import for those frameworks. The panel and no-op component also accept an omitted props argument during rendering. Both props are optional: theme defaults to 'dark' and devtoolsOpen defaults to true. Pass theme="light" to select the light theme. When using hotkeysDevtoolsPlugin(), the dock supplies these props and its values take precedence over the standalone defaults.
In production builds, the framework devtools adapters return no-op implementations, so they don't affect your bundle's behavior.
React also exposes a production import for when you explicitly want the plugin in production:
import { hotkeysDevtoolsPlugin } from '@tanstack/react-hotkeys-devtools/production'