Hover
#

The va-hover component provides easy access to hover states for any component. To work with hover states you can use either v-model or slot-scoped hover property.

Examples
#

Default usage
#

You can use v-model to get access to hover state.

Open in GitHub

Slot based access
#

You are also free to use Vue default slot.

Open in GitHub

Disabled
#

Won't change value if disabled.

Open in GitHub

API
#

Props #

NameDescriptionTypesDefault
disabled

Boolean

false

modelValue

Boolean

false

preset

String

-

stateful

Boolean

true

Events #

NameDescription

update:modelValue

The event is triggered when the component needs to change the model. Is also used by v-model

Slots #

NameDescription

default

Vue default slot.

FAQ
#

Can I wrap multiple elements with va-hover?
#

Yes, but they will share the hover state value.