You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
H2+H3 entries for Quick Start and Motivation sections,
H2-only from Core Concepts onward for a compact TOC.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Most web apps ship a static, read-only shortcuts list (at most). use-kbd provides a full keyboard UX layer:
94
110
@@ -117,14 +133,14 @@ Most web apps ship a static, read-only shortcuts list (at most). use-kbd provide
117
133
118
134
GitHub's command palette (`⌘K`) is conceptually similar to use-kbd's omnibar, but disconnected from the shortcuts modal. Drive has a search bar (rare!), but it's filter-only and read-only. Gmail requires a Settings toggle before shortcuts work at all.
119
135
120
-
### Inspiration
136
+
### Inspiration <aid="inspiration"></a>
121
137
122
138
- macOS and GDrive menu search
123
139
-[Superhuman] omnibar
124
140
-[Vimium] keyboard-driven browsing
125
141
- Android searchable settings
126
142
127
-
## Core Concepts
143
+
## Core Concepts <aid="concepts"></a>
128
144
129
145
### Actions
130
146
@@ -396,7 +412,7 @@ Customize the footer with `footerContent`:
396
412
397
413
Pass `footerContent={null}` to hide the footer entirely.
398
414
399
-
## Components
415
+
## Components <aid="components"></a>
400
416
401
417
### `<HotkeysProvider>`
402
418
@@ -484,7 +500,7 @@ Floating action button (FAB) with expandable secondary actions. Opens the omniba
484
500
/>
485
501
```
486
502
487
-
## Styling
503
+
## Styling <aid="styling"></a>
488
504
489
505
Import the default styles:
490
506
@@ -508,7 +524,7 @@ Customize with CSS variables:
508
524
509
525
Dark mode is automatically applied via `[data-theme="dark"]` or `.dark` selectors.
510
526
511
-
## Mobile Support
527
+
## Mobile Support <aid="mobile"></a>
512
528
513
529
While keyboard shortcuts are primarily a desktop feature, use-kbd provides solid mobile UX out of the box. **[Try the demos on your phone →][kbd.rbw.sh]**
514
530
@@ -530,7 +546,7 @@ While keyboard shortcuts are primarily a desktop feature, use-kbd provides solid
530
546
531
547
For apps that want keyboard shortcuts on desktop but still need the omnibar/search on mobile, this covers the common case without extra configuration.
532
548
533
-
## Patterns
549
+
## Patterns <aid="patterns"></a>
534
550
535
551
### ActionLink
536
552
@@ -597,7 +613,7 @@ Usage:
597
613
598
614
Adapt for Next.js, TanStack Router, or other routers by swapping the router hooks.
599
615
600
-
## Low-Level Hooks
616
+
## Low-Level Hooks <aid="hooks"></a>
601
617
602
618
For advanced use cases, the underlying hooks are also exported:
603
619
@@ -710,7 +726,7 @@ Register three related actions as a compact triplet. See [Action Triplets](#acti
710
726
711
727
Wraps `useHotkeys` with localStorage persistence and conflict detection.
712
728
713
-
## Debugging
729
+
## Debugging <aid="debugging"></a>
714
730
715
731
use-kbd uses the [`debug`] package for internal logging, controlled via `localStorage.debug`. Zero output by default—no config needed in downstream apps.
0 commit comments