IHoverDirectiveBinding

interface
Directives & Utilities

Typed directive binding for v-hover — extends Vue's DirectiveBinding with a typed value (boolean or config object) and the directive modifiers.

TypeScript

Definition

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

typescript

Inheritance

Extends

Parent interfaces this one inherits from. Their properties are available on every consumer of this interface.

API

Properties

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

value
boolean | IHoverDirectiveConfig
Directive binding value — a boolean to simply enable/disable, or an IHoverDirectiveConfig object for fine-grained class and handler control.
modifiers
required
{ callback: () => void, stop?: boolean }
Directive modifiers: callback is the function invoked on hover change; stop prevents event propagation when true.

Usage

Examples

Ready-to-paste code snippets using this interface.

Using the typed binding in a custom directive implementation

typescript