IHoverDirectiveConfig

interface
Directives & Utilities

Object configuration accepted by v-hover — specifies which CSS class to toggle and optional mouseenter/mouseleave 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.

class
string
CSS class toggled on the element while hovered. Defaults to `{componentName}--hover` when omitted.
mouseenter
(el: HTMLElement, e: Event) => void
Handler called when the pointer or touch enters the element.
mouseleave
(el: HTMLElement, e: Event) => void
Handler called when the pointer or touch leaves the element.

Usage

Examples

Ready-to-paste code snippets using this interface.

Passing a config object to v-hover

html