Directives detemplate.
Six directives runtime qui étendent n'importe quel template Vue. De la détection de clic à l'extérieur aux effets d'ondulation, en passant par les gestes swipe, le suivi de viewport, les classes au survol et l'application du contraste WCAG.
6 directives — enregistrées globalement
RÉFÉRENCE API
Toutes les 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.