ui/integrations
Integrations
Compose @diffgazer/ui components with @diffgazer/keys hooks for scopes, shortcuts, and navigation.
@diffgazer/ui components stay headless about keyboard behavior and compose with @diffgazer/keys for scopes, shortcuts, and navigation. Some keys APIs are standalone — they take a ref and run anywhere, copyable through dgadd. The rest are provider-backed: they register through KeyboardProvider to share one dispatcher and the scope stack, and ship package-only.
Reference & utilities
Per-area integration
Which page do I need?
- A keyboard shortcut — useKey (requires
KeyboardProvider). - List, menu, or tab movement — Navigation (standalone).
- Movement between regions of a layout — Focus Zones (requires
KeyboardProvider). - Focus trap, focus restore, or scroll lock — Utilities (standalone).
- A full worked example — Patterns.