Templatedirectives.
Six runtime directives that extend any Vue template. From click-outside detection to ripple effects, swipe gestures, viewport tracking, hover classes, and WCAG contrast enforcement.
6 directives — globally registered
API REFERENCE
All directives.
v-click-outside
Calls a handler when a click lands outside the bound element. Supports Shadow DOM via handleShadow() and an optional closeConditional guard to suppress the callback.
v-contrast
Automatically adjusts foreground text colour to meet the WCAG AA contrast ratio (4.5:1 by default, configurable via createOrigam). Pass false to opt out on a specific element.
v-hover
Toggles a CSS class on an element while the pointer is over it. Supports a callback mode (.callback modifier) and propagation stop (.stop modifier).
v-intersect
Wraps the IntersectionObserver API. Fires a callback each time the element enters or leaves the viewport. Supports .once to disconnect after the first entry and .quiet to skip the initial call on mount.
v-ripple
Applies a Material-style ripple animation emanating from the click position. Supports centered ripples, circular clipping, custom CSS classes and propagation stop.
v-touch
Attaches touch event listeners (touchstart, touchend, touchmove) and recognises swipe gestures (left, right, up, down). All handlers are optional; only attach what you need.