0.1.8 • Published 4 years ago

@vaadin/active-state-mixin v0.1.8

Weekly downloads
134
License
Apache-2.0
Repository
github
Last release
4 years ago

@vaadin/active-state-mixin

This package provides ActiveStateMixin that does the following:

  1. Listen to keyboard, mouse and touch events on the host element

  2. Set active attribute on the host element in following cases:

  • Element has disabled property set to false
  • Mouse: primary (left) button is pressed
  • Keyboard: Enter or Space is pressed
  1. Remove active attribute when mouse / key / touch is released.

The mixin accepts a class that must apply DisabledStateMixin.