shortkit
v1.0.7
Published
The React toolkit for keyboard shortcuts ⚡️
Downloads
1
Maintainers
Readme
Install
npm i shortkit
Usage
import React from 'react'
import { useShortcut, ShortkitProvider } from 'shortkit'
const MyComponent = () => {
useShortcut('c', () => {
// Create a new document
}, { triggerInInputs: false })
return someGubbins
}
const App = () => {
return (
<ShortkitProvider>
<MyComponent />
</ShortkitProvider>
)
}
For more advanced usage, and to learn why Shortkit offers so much more awesomeness than similar libraries, check out the docs.