IHoverHtmlElementHover

interface
Directives & Utilities

Internal state object stored by the v-hover directive on the DOM element — holds the enabled flag, active class, touch detection and event handlers.

TypeScript

Definition

The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.

typescript

API

Properties

Every property declared by this interface, with its type, optionality and default.

enabled
boolean
Whether the v-hover directive is currently active on this element.
class
string
CSS class toggled by the directive while the element is hovered.
touched
boolean
True if the last interaction originated from a touch event.
isTouch
boolean
Whether the device is a touch-capable device.
mouseenter
(el: HTMLElement, e: Event) => void
Stored mouseenter handler for cleanup on directive unmount.
mouseleave
(el: HTMLElement, e: Event) => void
Stored mouseleave handler for cleanup on directive unmount.

Usage

Examples

Ready-to-paste code snippets using this interface.

Inspecting the internal hover state on a mounted element

typescript