hamelndigital

design

Overview

Hooks

Small, well-defined hooks — no wrappers around trivial React. All are client hooks exported from @hamelndigital/ui.

Reference

useHotkeys(combo, handler)Global key combos — mod = ⌘/Ctrl. Skips form fields by default.
useDebouncedValue(value, delay)Settles after the value stops changing — search inputs.
useMediaQuery(query)SSR-safe matchMedia via useSyncExternalStore.
useClipboard(delay?)copy() + transient copied flag for feedback.
useAsyncAction(fn)run/isLoading/error/data; stale results dropped.
useDisclosure()open/close/toggle state for dialogs and menus.
useControllableState()Props-or-state pattern for controlled components.
useTheme()theme / resolvedTheme / setTheme from HamelnProvider.
useToast()toast() + dismiss() for notifications.

Example

useHotkeys("mod+k", openPalette);
const debounced = useDebouncedValue(query, 250);
const { copy, copied } = useClipboard();
const { run, isLoading } = useAsyncAction(deploy);