0.1.8 • Published 4 years ago
@vaadin/active-state-mixin v0.1.8
@vaadin/active-state-mixin
This package provides ActiveStateMixin
that does the following:
Listen to keyboard, mouse and touch events on the host element
Set
active
attribute on the host element in following cases:
- Element has
disabled
property set tofalse
- Mouse: primary (left) button is pressed
- Keyboard: Enter or Space is pressed
- Remove
active
attribute when mouse / key / touch is released.
The mixin accepts a class that must apply DisabledStateMixin
.