Hooks
Installation
pnpm dlx @docyrus/cli add @docyrus/hooks-use-click-outsideUsage
import { useClickOutside } from '@docyrus/ui/hooks/use-click-outside';
function MyComponent() {
const result = useClickOutside(..., () => {}, 'mousedown');
}API Reference
| Parameter | Type | Default | Description |
|---|---|---|---|
ref | RefObject<T | null> | RefObject<T | null>[] | — | — |
handler | (event: Event) => void | — | — |
eventType | EventType | 'mousedown' | — |
Returns: void
useAdaptiveCard
Headless state, validation, visibility, and action dispatch for the Adaptive Cards 1.5 renderer. Drives the `AdaptiveCard` component and is exported so consumers can wire custom toolbars or server-side validation.
useDataExport
Project an in-memory array of rows through a column definition and trigger a browser download as CSV, JSON, Markdown, or XLSX.